[plug] appending files

Arie Hol arie99 at ozemail.com.au
Sat Sep 21 12:37:53 WST 2002


At 02:22 PM 20-09-2002 +0800, you wrote:
>Your DOS is showing. ::-) You can join files with the conCATenate
>command ("cat" takes one or more files, and sends them through to the
>output).
>
>Usually you would have to uncompress, but in the special case of gzip,
>you don't. If gunzip sees two chunks of compressed text one after the
>other, it will process both.
>
>So - you can go ;
>$ cat *.log.gz > biglog.gz
>
>...rather than ;
>$ gunzip *.log.gz
>$ cat *.log | gzip > biglog.gz
>

Excuse my ignorance on this one - but wouldn't it be better to use '>>'
instead of '>' to cat the two files together, I have the impression that
using '>' will overwrite the target and cause a subsequent loss of its contents.

Or better still - why not create a small script that accepts one or more
arguments (filenames) so the task can be run on a regular basis - maybe call
it 'catlogzip' or something.

Regards Arie

>--------------------------------------------<

For the concert of life, nobody has a program.

>--------------------------------------------<



More information about the plug mailing list