Mail Archives: djgpp/2001/10/11/11:04:37
JT Williams <jeffw AT darwin DOT sfbr DOT org> wrote:
> Is it possible/practical to duplicate stdin (without using tmp files)
> so that it can be scanned twice in a shell script?
No. You do need a tmp file. On DOS, worrying about creation of a
temp file is a non-issue anyway, as even a simple | between programs
creates one already.
The basic problem is the possible size of stdin input. *Something*
has to hold the full size of those input data, and if you rule out tmp
files, the only choice of place remaining would be RAM. But you can't
assume that RAM is big enough to hold that file, and besides, the
Shell doesn't provide means of doing that, anyway.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -