SyntaxFix
Write A Post
Hire A Developer
Questions
"foreach" is not the name for bash. It is simply "for". You can do things in one line only like:
for fn in `cat filenames.txt`; do cat "$fn"; done
Reference: http://www.cyberciti.biz/faq/linux-unix-bash-for-loop-one-line-command/