9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] just one thing i can't figure out doing
@ 2003-02-12  0:08 andrey mirtchovski
  2003-02-12  0:13 ` Russ Cox
  0 siblings, 1 reply; 3+ messages in thread
From: andrey mirtchovski @ 2003-02-12  0:08 UTC (permalink / raw)
  To: 9fans

i've been running my head against the wall on this one. short of reading the
man page for rc i decided to ask the list first:

i want to execute a 'window -m' where the command the window executes
involves redirection (eg: cat >> /tmp/test)...

so, naturally the first try is:

    % window -m cat >> /tmp/test

but unfortunately this doesn't work (the window closes and no error status
is reported in the original shell)

the second thing was:

    % fn out { cat >> /tmp/test }
    % window -m out

but it still didn't work...

then i spent an hour trying all sorts of different quoting (trying to pass
it as a list, to quote each and every one of them, to quote them together,
to concatenate them with ' ' and everything else, including \>)...

a way of doing this would be to create a yet another script that just cats
it to /tmp, but that, in my view, is an overkill for something so simple...

please, point me the obvious error that i am making...


andrey


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

* Re: [9fans] just one thing i can't figure out doing
  2003-02-12  0:08 [9fans] just one thing i can't figure out doing andrey mirtchovski
@ 2003-02-12  0:13 ` Russ Cox
  2003-02-12  0:17   ` andrey mirtchovski
  0 siblings, 1 reply; 3+ messages in thread
From: Russ Cox @ 2003-02-12  0:13 UTC (permalink / raw)
  To: 9fans

the rc man page will not shed any light here.
looking at /rc/bin/window might, though.
you'll see that the command is executed by
just running $cmd where cmd is the arguments
given to window.  you want something that works
if typed at a shell prompt but doesn't do anything
that would cause parsing by rc before getting
into window.  in other words

window -m rc -c 'cat >>/tmp/out'



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

* Re: [9fans] just one thing i can't figure out doing
  2003-02-12  0:13 ` Russ Cox
@ 2003-02-12  0:17   ` andrey mirtchovski
  0 siblings, 0 replies; 3+ messages in thread
From: andrey mirtchovski @ 2003-02-12  0:17 UTC (permalink / raw)
  To: 9fans

On Tue, 11 Feb 2003, Russ Cox wrote:

> window -m rc -c 'cat >>/tmp/out'

ahh, silly me.. i stopped at 'window -m rc 'cat >>/tmp/out'' :)


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

end of thread, other threads:[~2003-02-12  0:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-12  0:08 [9fans] just one thing i can't figure out doing andrey mirtchovski
2003-02-12  0:13 ` Russ Cox
2003-02-12  0:17   ` andrey mirtchovski

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).