[lug] Appending a file to files
Ken Weinert
kenw at ihs.com
Tue Jan 16 10:29:21 MST 2001
* Atkinson, Chip (CAtkinson at Circadence.com) [010116 17:20]:
> Ok. Try this:
>
> for i in $(ls bar); do
> cat foo >> $i
> done
Or, combine the two - it really depends on whether bar contains
subdirectories, whether you want to recurse them, etc:
for file in $(find bar -type f); do
cat foo >> $file
done
You can add options to find to limit it to one level, it will recurse by
default.
--
Ken Weinert kenw at ihs.com 303-858-6956 (V) 303-705-4258 (F)
GnuPG KeyID: 9274F1CE GnuPG available at http://www.gnupg.org/
GnuPG Key Fingerprint: 1D87 3720 BB77 4489 A928 79D6 F8EC DD76 9274 F1CE
A flying saucer results when a nudist spills his coffee.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20010116/ba093164/attachment.pgp>
More information about the LUG
mailing list