[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
multiple inputs / outputs through descriptors
From: |
textutils1 |
Subject: |
multiple inputs / outputs through descriptors |
Date: |
Sat, 30 Aug 2003 17:20:04 -0400 (EDT) |
Hi,
Since I didn't find textutils / coreutils discussion list
(only coreutils-announce), and this is more of a technical
implementation / feature issue, I'm writing this into
bug-textutils. Please forward / repost where appropriate or
let me know.
Here it is:
Background:
Too often do I create a temporary file because a
process requires more than one input data stream (one data
stream is available, usually called "STDIN" or "Standard
Input"). But e.g. diff takes two and diff3 takes three.
Idea / proposal:
Standardize throughout GNU utils (just like long options
have been standardized) a descriptor input / output syntax.
e.g. I could write (in bash) something like this :
( process1 --output 3>&1 ; process2 --output 4>&1 ) | diff --input-file %3%
--input-file %4%
So each GNU utility (at least coreutils / textutils) would
have the standard option --input-file which would recognize
the string %_number_% as a descriptor number.
Perhaps there could also be an equivalent short option
like "-%3%"
The same thing could be applied to outputs :
( process1 3>&1 ; process2 4>&1 ) | a_util -%3% -%4% -o - --log1 %5% --log2 %6%
| diff3 - -%5% -%6%
It would be such a relief not having to create temp files ...
Has this been someplace discussed and officially decided
upon ? Where ? (I googled but didn't feel lucky :( )
Thanks,
John
--
-- Gospel of Jesus' kingdom = saving power of God for all who believe --
## To some, nothing is impossible. ##
- multiple inputs / outputs through descriptors,
textutils1 <=