Use bash to read a file and then execute a command from the words extracted

后端 未结 3 1262
没有蜡笔的小新
没有蜡笔的小新 2020-12-24 08:12

FILE:

hello
world

I would like to use a scripting language (BASH) to execute a command that reads each WORD i

3条回答
  •  無奈伤痛
    2020-12-24 08:54

    normally i would ask what have you tried.

    while read -r line 
    do 
       command ${line} > ${line}.txt
    done< "file"
    

提交回复
热议问题