分类: 其他平台
2019-08-22 15:25:03
xxx@ubuntu:~/test$ cat cmp.txt | more
STR_ID0=
STR_ID1=STR_SYSTEM1
STR_ID2=STR_PLAYBACK1
STR_ID3=STR_BACKUP1
STR_ID4=STR_PTZ
STR_ID5=STR_SNAPSHOT1
...
xxx@ubuntu:~/test$ awk -F"=" '{if($2!=""){cmd="find ./ -name \"*.c\" -o -name \"*.h\" | xargs sed -i \"s/\\<"$1"\\>/"$2"/g\"";print cmd;system(cmd)}}' ./cmp.txt