> > I need to append the text of a file called newcss to all of the files called
> > main.css in a lot of subfolders.
> > I was thinking that I could just do this:
> > find /folder -name main.css | more /newcss >> $1
> > but, it appears that when the find command returns, $1 isn't going to cut
> > it...
> > can anyone help me out on this?
> > thanks,
> > fnord
> for i in `find /folder -name main.css`; do cat newcss >> $i; done
> should do the trick.
> Michael Heiming
not to steal anything, but
another opportunity for "foreach"
function list_of { find /folder -name $1; }
function main_list { list_of main.css'; }
function append_to { cat newcss >> $1; }
foreach append_to $(main_list)