shell脚本记录

141 阅读1分钟

多文件合并

combineFileContent(){

for file in ./*

do

if ( test -f $file )

then

echo $file

cat $file >> search.txt

fi

if ( test -d $file )

then

echo $file 是目录

fi

done

}

删除html标签

removeHTMLTags(){

sed -i '' 's/<[^>]*>//g' a.txt

}