Subject: Re: cat(1) question: multiple "-"s
To: None <netbsd-users@NetBSD.org>
From: Peter Bex <Peter.Bex@xs4all.nl>
List: netbsd-users
Date: 04/19/2006 09:56:09
--8tpUGmYwaewiPhBZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Wed, Apr 19, 2006 at 09:46:28AM +0200, Hubert Feyrer wrote:
> OK - i guess that's the same for pipes as for files then.
> Thanks!
I hope I'm not stating the over-obvious, but here goes.
If you use a fifo, it works as you'd expect:
$ cat blah
two
$ mkfifo ./fifo
$ cat - blah - < ./fifo
[in another shell]
$ echo "one" > ./fifo
$ echo "three" > ./fifo
Then, in the first shell, the output is
one
two
three
Regars,
Peter
--=20
http://www.student.ru.nl/peter.bex
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
--8tpUGmYwaewiPhBZ
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (NetBSD)
iQEVAwUBREXtGdOrBFwYag3gAQK3xQf+N5KfDN1sSOI4ekoOGNut1y3sVaqo6RZ4
mSHL066RLzs9A48whMr1NNZBNRdN+rIL9C/ChdbudHIxTMkQn5mx81zoSyph7ZD1
oIoc2ht84p/6NLWYU8wtsoBQK1d9oCxdrOV2H7vXAPIl+fIuNu63asVPYyfqtSou
wTX0sKxfH5Pti5j+uhAgNsu2G4A+34pAL4TvLhxY6YNHlMliLCgOOZxCzBtleIn3
Ej2abIzEYXiafKGJzv4o84W8I3rGVD4/ApaJCrAbf2gXzS2pSwkozCNKy0yYiN3w
Ds3W1FgMFAwTVtvdXlIY6uV7nwqnLmX37A6RFmcy1+AGv+oKL6jWBQ==
=PUCS
-----END PGP SIGNATURE-----
--8tpUGmYwaewiPhBZ--