sed 插入\n ? - Linux

Dorothy avatar
By Dorothy
at 2011-04-22T18:55

Table of Contents

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

--
Tags: Linux

All Comments

Isla avatar
By Isla
at 2011-04-26T16:52
// a ...
Xanthe avatar
By Xanthe
at 2011-04-28T15:06
sed -i "s:^exit 0$:$str\nexit 0:g" filename

四核心CPU+8G Ram 上網變順很多 這是錯覺嗎?

Ingrid avatar
By Ingrid
at 2011-04-22T18:15
朋友目前使用 and#34; ubuntu 10.10 中文客製化LTH版 and#34; 他原來的電腦是 intel 雙核心 CPU ( 時脈約2.2G ) + 2G 記憶體 後來換成 intel 四核心 CPU ( 時脈約 3.3G ) + 8G 記憶體 朋友感覺換新電腦後 上網變得順多了 ( 上網用的是 ...

如何以web觀看/dev下的資料

Skylar Davis avatar
By Skylar Davis
at 2011-04-22T15:25
※ 引述《danielsig727 (呆牛)》之銘言: : 恩... 其實我是在 FreeBSD 跑 lighty 的 :P 不過操作方法應該大同小異啦哈哈 : 在 /etc/lighttpd/lighttpd.conf (這個路徑是推測的,反正就是主要 conf 就是了 :P) : 加入 : $HTTP[a ...

如何以web觀看/dev下的資料

Valerie avatar
By Valerie
at 2011-04-22T13:51
※ 引述《liaommx (Orz)》之銘言: : 我抓了一張圖 : http://ppt.cc/i3As : 這是在 : http://www.kernel.org/pub/linux/daemons/ntp/pps/ : 的內容 : 不過我想請教的是, : 我使用lighttpd,該修改那些檔案內容才能達 ...

如何以web觀看/dev下的資料

Hedwig avatar
By Hedwig
at 2011-04-22T13:02
我抓了一張圖 http://ppt.cc/i3As 這是在 http://www.kernel.org/pub/linux/daemons/ntp/pps/ 的內容 不過我想請教的是, 我使用lighttpd,該修改那些檔案內容才能達到這個效果? 或是有沒有套件可以達到這個效果?(純html傳輸,非p ...

DRBL與Clonezilla「集中管理環境」進階課程(台南)

Eartha avatar
By Eartha
at 2011-04-22T11:00
課程名稱: DRBL與Clonezilla「集中管理環境」進階課程 上課方式: 實體教室 + 線上數位教學之輔助教材 上課地點: 國家高速網路與計算中心(台南) 電腦教室(二) http://www.nchc.org.tw/tw/about/traffic/southern_office.php ...