9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] sam and stdin again
@ 2004-05-09 12:52 Matthias Teege
  2004-05-09 14:11 ` boyd, rounin
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Teege @ 2004-05-09 12:52 UTC (permalink / raw)
  To: 9fans

Moin,

I playing with the following script.

#!/bin/rc
cat foo.txt | [3=1] sam -d /fd/3 << '!'
w /fd/1
!

But I only get

 -. /fd/3
/fd/1: #0

in place of an echo. What is the probem?
Matthias


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] sam and stdin again
  2004-05-09 12:52 [9fans] sam and stdin again Matthias Teege
@ 2004-05-09 14:11 ` boyd, rounin
  0 siblings, 0 replies; 2+ messages in thread
From: boyd, rounin @ 2004-05-09 14:11 UTC (permalink / raw)
  To: 9fans

> #!/bin/rc
> cat foo.txt | [3=1] sam -d /fd/3 << '!'
> w /fd/1
> !

i don't think you want do it with a pipe based redirection.

this does what you want:

brahma% cat s
#!/bin/rc

echo foo | >[3=0] sam -d /fd/3 >[2] /dev/null <<!
w /fd/1
q
!
brahma% ./s
foo



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-09 14:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-09 12:52 [9fans] sam and stdin again Matthias Teege
2004-05-09 14:11 ` boyd, rounin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).