About 100,000 results
Any time
Open links in new tab
- Viewed 390k times268answered Nov 12, 2010 at 8:35
Something like this would do:
xargs cat <filenames.txtThe xargs program reads its standard input, and for each line of input runs the cat program with the input lines as argument(s).
If you really want to do this in a loop, you can:
for fn in `cat filenames.txt`; doecho "the next file is $fn"cat $fndoneContent Under CC-BY-SA license Bash foreach loop - Stack Overflow
How do I write a 'for' loop in Bash? - Stack Overflow
Loop through an array of strings in Bash? - Stack Overflow
How do I iterate over a range of numbers defined by variables in …
How to iterate over arguments in a Bash script - Stack Overflow
Looping through the content of a file in Bash - Stack Overflow
- People also ask
bash shell nested for loop - Stack Overflow
Executing for-each in bash - Stack Overflow
How can I loop over the output of a shell command?
How to iterate over associative arrays in Bash - Stack Overflow
Related searches for Bash Foreach Loop site:stackoverflow.com