藍森林首頁 | 返回主頁 | 本站地圖 | 站內搜索 | 聯繫信箱 |
 您目前的位置:首頁 > 自由軟件 > 技術交流 > 應用編程


    

藍森林 http://www.lslnet.com 2006年6月26日 11:18


請教關於for的簡單問題

請教一個問題,在for循環中
for program in ls 'ps -a' pwd
do
        $program
done

可以執行這三個命令,如果把這些命令放到name文件裡
$cat name
ls
ps -a
pwd

然後執行for program in `cat name`
會無法解析ps -a
不知道怎麼改法?

請教關於for的簡單問題

tyr:
while read command;do $command;do<name

請教關於for的簡單問題

不是很明白,大哥能講的詳細點嗎?謝謝啦

請教關於for的簡單問題

-->

烈火兄手誤了:)
應該是while read command;do $command;done<name

請教關於for的簡單問題

恩,可以啦,謝謝兩位



Copyright © 1999-2000 LSLNET.COM. All rights reserved. 藍森林網站 版權所有。 E-mail : webmaster@lslnet.com