sed -i 直接修改html
sed 是負責插入替換刪除字符串操做。htm
sed -n '/11/p' 11.txt |sed 's/11/33333/g' 查找11並替換11位3333blog
sed 's/11/33333/g' 11.txt 將11 替換成33333字符串
https://www.cnblogs.com/maybe2030/p/5325530.htmlawk
awk 待完善sed
舉個例子循環
下面的既有輸出打印,也有判斷,還有循環輸出。co
awk -F ':' 'BEGIN {count=0; printf("[start] count is %s\n",count)} {count=count+1;if(count < 5) print $0;} END {printf("[END] count is %s",count);for(i=0;i<NR;i++) print i}' /etc/passwd字符