The middle one will be more portable .. note that the third one produces different final naming scheme.cd some_dir for f in Test*.txt ; do cat /tmp/commonfile.txt $f > Final.$f ; done find Test*.txt -maxdepth 0 -exec cat /tmp/commonfile.txt {} > Final.{} + \; for n in `seq 1 100`; do cat /tmp/commonfile.txt Test$n.txt > Final$n. +txt ; done
In reply to Re: Looping the files in directory to combine with a common file
by davidrw
in thread Looping the files in directory to combine with a common file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |