[lug] Appending a file to files

Robert Payne robpayne at us.ibm.com
Tue Jan 16 12:49:22 MST 2001


Without the parenthesis should work.

for files in bar/* ; do
     cat foo >> $files
done

Glenn Murray <gmurray at Mines.EDU>@lug.boulder.co.us on 01/16/2001 09:33:50
AM

Please respond to lug at lug.boulder.co.us

Sent by:  lug-admin at lug.boulder.co.us


To:   "'lug at lug.boulder.co.us'" <lug at lug.boulder.co.us>
cc:
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