Q:

for while bash

while true;
do
	#code
done
8
while true;
do
	#code
;done
2
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
0

New to Communities?

Join the community