[lug] Appending a file to files
Atkinson, Chip
CAtkinson at Circadence.com
Tue Jan 16 13:33:56 MST 2001
Jeez. You're right. Ok, here's what I often do for this very reason:
tar cvf bar.sav bar
:-)
Chip
> -----Original Message-----
> From: Glenn Murray [mailto:gmurray at Mines.EDU]
> Sent: Tuesday, January 16, 2001 11:41 AM
> To: lug at lug.boulder.co.us
> Subject: Re: [lug] Appending a file to files
>
>
>
> On Tue, 16 Jan 2001, Ken Weinert wrote:
> > * 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
>
> The first script above put the concatenated files into
> the home directory---not into bar/. However, the
> second script did the trick.
>
> Thanks, Ken.
>
> Glenn
>
> P.S. My apologies for all the double postings. For
> some reason posting from my Linux partition was
> happening much more slowly than from my Windows
> partition, even though I'm using pine in both
> and going through the same campus server.
>
>
>
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>
More information about the LUG
mailing list