請問使用shell得到一數字 - Linux

Table of Contents


請問要如何透過shell達到以下事情

1.在 /proc/id 取出內容 (內容只有數字, 不用parser)
2.帶入要執行程式的尾端 ex : prog 1
'1'為取到的id值

謝謝!

--

All Comments

John avatarJohn2010-04-13
1. cat/grep/sed/awk
2. xargs
Rachel avatarRachel2010-04-16
echo $s1? 是這樣嗎?