Re: FVWM: simple question: how execute xterm and then a script?

From: Cameron Simpson <cs_at_zip.com.au>
Date: Sun, 18 Aug 2002 09:38:23 +1000

On 22:41 17 Aug 2002, Mikhael Goikhman <migo_at_homemail.com> wrote:
| On 17 Aug 2002 15:52:35 -0600, Rob 'Feztaa' Park wrote:
| > Alas! Mikhael Goikhman spake thus:
| > > If your script immediatelly exits after printing the output you should
| > > prevent xterm from being closed, something like:
| > > Exec exec xterm -e sh -c "date; head -1"
| > > where "date" is your script. This waits for Enter to be closed.
| > Interesting; I would have done 'read' instead of 'head -1' ;)

Me too. Doesn't even fork an extra process.

| head is more portable, read is not available in some shells like tcsh/csh.

Speaking as one who predates "head" I'd had differed on this:-) (Well, at the
least started on systems that predated "head").

True, [t]csh users can't use read. But Bourne shell users can, and should.

While we're picking nits, if one must read for an extra command, "sed q" is
even shorter. I have never liked "head" myself; "tail" I understand - it's
hard to do otherwise. But a simple:
        sed 12q
is the same as
        head -12
and shorter and easier to type. And sed definitely predates head.

Cheers,
--
Cameron Simpson, DoD#743        cs_at_zip.com.au    http://www.zip.com.au/~cs/
Our job is to make the questions so painful that the only way to make the
pain go away is by thinking.	- Fred Friendly
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Sat Aug 17 2002 - 18:39:16 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:53 BST