From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from doolittle.vetsci.su.OZ.AU ([129.78.148.2]) by hawkwind.utcs.toronto.edu with SMTP id <2703>; Wed, 17 Jun 1992 09:18:32 -0400 Received: by doolittle.vetsci.su.oz.au id <49226>; Wed, 17 Jun 1992 23:18:00 +1000 From: John (_You_ hide, they seek.) Mackin Date: Wed, 17 Jun 1992 09:01:51 -0400 To: The rc Mailing List Subject: Re: Adding the '-s' flag? In-Reply-To: <9206171300.AA13571@earth.osf.org> Message-ID: <199206172301.17232.rc.balek@vetsci.su.oz.au> X-Face: 39seV7n\`#asqOFdx#oj/Uz*lseO_1n9n7rQS;~ve\e`&Z},nU1+>0X^>mg&M.^X$[ez>{F k5[Ah<7xBWF-@-ru?& @4K4-b`ydd^`(n%Z{ 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