shell
文章平均质量分 65
greenlaomao
这个作者很懒,什么都没留下…
展开
-
shell脚本,对指定目录下C文件,替换和删除字符串
#!/bin/shecho -e "file patch"read file_pathfind $file_path -name "*.c" > path.txtdos2unix -q path.txtline_number=$(cat path.txt | wc-l)for(i=1;i<$line_number;i++){ sed_para="$(i)p" cmd="se...原创 2018-03-12 09:52:29 · 487 阅读 · 0 评论 -
文档按固定格式字符串排序
#!/bin/shecho -e "original file name"read fileecho -e "target file name"read file cat "$file" | grep "xxx" -n > index.txtsed "s/\([0-9]\)":fix_string.*/\1/g" index.txt > linerecord.txt #原创 2018-03-22 15:26:18 · 339 阅读 · 0 评论