請問sed 的一個小問題 - Linux

Andy avatar
By Andy
at 2008-06-24T21:07

Table of Contents

sed '5p'

會印出第5行

那如果5是記在一個$num 的變數裡

應該要怎麼寫呢?謝謝 :)

我用 sed '$nump'

sed '\$nump'

都不行

--
Tags: Linux

All Comments

Susan avatar
By Susan
at 2008-06-26T08:22
我剛剛測試 $num'p' 可以...

目前fedora core 几是比較穩定的~

Edith avatar
By Edith
at 2008-06-24T15:42
※ 引述《kenduest.bbsatbbs.sayya.org (小州)》之銘言: : ※ 引述《ahboy.bbsatptt.cc (小馬來)》之銘言: : andgt; 因為想架站(長期) : andgt; 所以想找個比較穩定的版本,兩三年內還有會在 : andgt; 維護的(yum update) : ...

一網卡設多IP的問題

Linda avatar
By Linda
at 2008-06-24T15:35
假設某校有幾個沒有用到的真實IP 是否可以由一台機器把這些IP全部設給他,如 ifconfig eth0:2 **.**.**.2 netmask 255.255.255.0 broadcast **.**.**.255 ifconfig eth0:3 **.**.**.3 netmask 255.255. ...

ps + grep

Audriana avatar
By Audriana
at 2008-06-24T12:13
※ 引述《everydate (月)》之銘言: : 請問一下 : 如果我要用 ps 去找某一個行程是否在執行中 : (ex) ps | grep and#34;testprocessand#34; : 結果會永遠會有結果 因為它連這個動作都算進去了 : 5407 root 304 S gr ...

ps + grep

Madame avatar
By Madame
at 2008-06-24T11:19
請問一下 如果我要用 ps 去找某一個行程是否在執行中 (ex) ps | grep and#34;testprocessand#34; 結果會永遠會有結果 因為它連這個動作都算進去了 5407 root 304 S grep testprocess 這樣就不能用了 ... ...

Xubuntu正體中文版?

Hedda avatar
By Hedda
at 2008-06-24T11:19
X請問ubuntu有正體中文版嗎?? 找好久 官網很多語言 就是沒看到中文.... http://www.xubuntu.org/get#hardy -- 我不是聖賢豪士,我只有一腔熱血 http://blacksun0924.spaces.live.com/ - ...