Correction Re: [ILUG] add headers to multiple files in bash
Paul O'Malley
ompaul at eircom.net
Sun Jun 20 10:33:29 IST 2004
On Sat, 2004-06-19 at 01:15, Paul O'Malley wrote:
> On Fri, 2004-06-18 at 14:40, Kae Verens wrote:
> > kevin lyda wrote:
> > >
> > cat header original > newfile && mv newfile original -f
> >
> > Kae
>
> Is this a useful thought:
> cat my_c_prog.c > header; mv header my_c_prog.c
This should read:
cat my_c_prog.c >> header; mv header my_c_prog.c
> I you want to do this over and over I found the following link:
>
> http://www.ibiblio.org/pub/Linux/utils/file/!INDEX.html
>
> The file name to search for is prepend-0.1.tar.bz2 or it's slightly
> bigger cousin prepend-0.1.tar.gz. I have not tested them, if you do use
> it do tell us what you think - I note that the release date was 2002.
>
> I it does not do lots of files automagically perhaps you should put it
> to work like this:
> echo foo* | xargs prepend
> It might help more if you can make foo* a version similar to the name of
> a particular file.
>
> Regards,
>
> Paul
More information about the ILUG
mailing list