sed 插入\n ? - Linux

Table of Contents

想要在shell script中使用sed去插入
在某檔案中的 Exit(0) 字串的上一行插入某字串
請問大大知道要怎麼作?
謝謝

--

All Comments

Isla avatarIsla2011-04-26
// a ...
Xanthe avatarXanthe2011-04-28
sed -i "s:^exit 0$:$str\nexit 0:g" filename