linux源文件单词替换处理
#!/bin/bash for s in $(ls *.[ch]) do echo "file: $s" news="${s}_bak" echo "newfile: $news" cat $s | sed s/iscsi_socket_t/mds_socket_t/g > ${news} mv -f ${news} $s done
linux源文件单词替换处理
#!/bin/bash for s in $(ls *.[ch]) do echo "file: $s" news="${s}_bak" echo "newfile: $news" cat $s | sed s/iscsi_socket_t/mds_socket_t/g > ${news} mv -f ${news} $s done