> ~/logName; done.Just as you typed it should be fine except: for i in" />
开发者

how to run more than one command one terminal?

i 开发者_JAVA技巧have to run "for" loop on linux terminal itself how i can do. ex.for i in cat ~/log;do grep -l "UnoRuby" $i >> ~/logName; done.


Just as you typed it should be fine except: for i in $(cat ~/log); do grep -l "UnoRuby" $i >> ~/logName; done


You should prefer < instead of cat, and a more friendly format for the quesiton:

for i in $(< ~/log)
do
  grep -l "UnoRuby" $i >> ~/logName
done
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜