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

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


You can use the "for" loop to do this. something like..

for WORD in `cat FILE`do   echo $WORD   command $WORD > $WORDdone


normally i would ask what have you tried.

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


IFS=$'\n';for line in `cat FILEPATH`; do command ${line} > ${line}; done