[lug] Appending a file to files

Atkinson, Chip CAtkinson at Circadence.com
Tue Jan 16 10:17:21 MST 2001


Ok.  Try this:

for i in $(ls bar); do
  cat foo >> $i
done

> -----Original Message-----
> From: Glenn Murray [mailto:gmurray at Mines.EDU]
> Sent: Tuesday, January 16, 2001 10:05 AM
> To: Boulder Linux User's Group
> Subject: RE: [lug] Appending a file to files
> 
> 
> 
> 
> On Tue, 16 Jan 2001, Atkinson, Chip wrote:
> 
> > Don't know why it wouldn't work, but how about 
> > for i in (bar/*); do
> >   cat foo >> $i
> > done
> 
> Thanks for the response, but this script produces the
> following error.  
> 
> glenn/$ sh catscr.sh 
> catscr.sh: line 1: syntax error near unexpected token `(b'
> catscr.sh: line 1: `for i in (bar/*); do'
> glenn/$ 
> 
> Glenn
> 
> 
> 
> _______________________________________________
> 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