作者deepking (wnuiayldh)
看板Linux
標題[問題] sed 插入\n ?
時間Fri Apr 22 18:55:19 2011
想要在shell script中使用sed去插入
在某檔案中的 Exit(0) 字串的上一行插入某字串
請問大大知道要怎麼作?
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.221.177.192
推 garyzyg:// a ... 04/23 10:35
推 rex0625:sed -i "s:^exit 0$:$str\nexit 0:g" filename 04/25 18:33