On Thu, Apr 3, 2008 at 2:05 PM, Jim Meyering <[EMAIL PROTECTED]> wrote:
 >  Sounds interesting.
 >  I suppose it can work with an arbitrary decompressor?
 >
 >  Note this relatively new option:
 >
 >       --compress-program=PROG  compress temporaries with PROG;
 >                               decompress them with PROG -d
 >

 Yep.

 My current convention is:

  --magic-open=PROG[,PROG]...

 So if you want to merge a gzip'd file with a bzip2'd file you can use
 --magic-open=gzip,bzip2 (or just --magic-open, which enables all).

 For each regular file it checks magic and if it looks like a type that
 can be handled by one of PROG it opens a PROG -d -c -f (the -f is just
 in case the magic was a false-positive).

 Of course this re-introduces findprog into sort (for find_in_path),
 which may not be desirable.  A convention more similar to that used
 for --compress-program would eliminate this (and the magic-checking),
 but limit a given merge to files compressed with a single program.

 Bo


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to