* Re: Adding the '-s' flag?
[not found] <9206171300.AA13571@earth.osf.org>
@ 1992-06-17 13:01 ` John Mackin
0 siblings, 0 replies; 3+ messages in thread
From: John Mackin @ 1992-06-17 13:01 UTC (permalink / raw)
To: The rc Mailing List
I have been carrying on a discussion with Rich about the -s flag, and he
made the following comment:
I would like a version of script that took a commandline to run; wold
be useful at times.
More and more and more I am so excruciatingly glad that I changed over to
rc when I did. Sure, the quoting is clean, sure, we have confidence in
interactive constructs because we understand the grammar, but never mind
all that! The biggest reason to use rc is, it just pays off again and
again in total functionality!! If you have a shell which is sophisticated,
powerful, understandable _and_ lacking in `dark corners,' well, you really
can accomplish anything.
You want script to be able to run a command? Absolutely too easy! Don't
change the real script, just install this (which I just wrote but have
tested) in $path in front of it, called script. Giving it a usage
compatible with real script (-a for append, supply script filename)
is left as an exercise for the reader.
[By the way Rich: unless your version of script has powers and abilities
far beyond those of mortal versions, why not trash it and render the -s
question moot?]
OK,
John.
#!/full/path/to/rc
SHELL = /full/path/to/rc # if you think anyone will run it with $SHELL
# set otherwise
if ( ! ~ $#* 0 ) eval fn prompt '{' $* ';' exit '}'
exec /full/path/to/real/script
^ permalink raw reply [flat|nested] 3+ messages in thread