开发者

how i can make content of file as output of command?

开发者 https://www.devze.com 2023-01-17 12:26 出处:网络
i have a file contain list of path no开发者_如何学运维w i want to execute command on each line example :-

i have a file contain list of path no开发者_如何学运维w i want to execute command on each line example :-

file name : rawabdeh
command : command

file contain:-

path/no/1/
path/no/2/
path/no/3/ 

i want to do the following :

command path/no/1/
command path/no/2/
command path/no/3/


while read path <&3
do
  command "$path" 3<&-
done 3<rawabdeh

This will execute command on each of the paths -- is this what you're trying to achieve?

0

精彩评论

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