For Line In Output Bash

[Solved] For Line In Output Bash | Basic - Code Explorer | yomemimo.com
Question : for line in output bash

Answered by : armando-flores

Use for in bash for iterating words in a string or values in an array as:
for value in {1, 2, 3}; do echo $value; done
for value in $(cat arguments_files.txt); do [some_command]; done
And use while for iterating lines from a pipe output as:
cat arguments_file.txt | while read line; do [some_command]; done

Source : | Last Update : Mon, 02 Nov 20

Answers related to for line in output bash

Code Explorer Popular Question For Basic