Hi Bo,

> As I mentioned last week, I've patched my local `sort' to allow
> automatic decompression of input files if an option, --magic-open, is
> passed on the command line.
>
> As I thought more about this functionality I realized that it may be
> more broadly useful.  Any utility that can operate on multiple input
> files could benefit.  I wondered if it would be possible in a
> non-invasive way to provide this service to other tools.  This is what
> I came up with.
>
> Instead of:
> $ sort --magic-open a.gz b.bz2 c.txt
>
> I run:
> $ magic sort a.gz b.bz2 c.txt

This sounds very similar to the zrun command from the moreutils package:

| This is a growing collection of the unix tools that nobody thought
| to write thirty years ago.
|
| So far, it includes the following utilities:
|  - isutf8: check if a file or standard input is utf-8
|  - sponge: soak up standard input and write to a file
|  - ts: timestamp standard input
|  - vidir: edit a directory in your text editor
|  - vipe: insert a text editor into a pipe
|  - combine: combine the lines in two files using boolean operations
|  - ifdata: get network interface info without parsing ifconfig output
|  - pee: tee standard input to pipes
|  - zrun: automatically uncompress arguments to command
|  - mispipe: pipe two commands, returning the exit status of the first
|  - lckdo: execute a program with a lock held

Regards - Peter Edwards


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

Reply via email to