Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site turtlevax.UUCP Path: utzoo!utcs!lsuc!pesnta!amd!turtlevax!ken From: ken@turtlevax.UUCP (Ken Turkowski) Newsgroups: net.puzzle,net.unix Subject: Re: How to get the C-shell to recognize -? Message-ID: <759@turtlevax.UUCP> Date: Mon, 13-May-85 11:53:42 EDT Article-I.D.: turtleva.759 Posted: Mon May 13 11:53:42 1985 Date-Received: Tue, 14-May-85 05:31:17 EDT References: <758@turtlevax.UUCP> Distribution: net Organization: CADLINC, Inc. @ Menlo Park, CA Lines: 37 Xref: utcs net.puzzle:827 net.unix:4478 An the winner is: Paul Richards University of Illinois at Urbana-Champaign, Dept of Comp Sci uiucdcs!richards switch ("$flag") case '-[?]': breaksw case '-a': ... endsw This is the only correct entry so far. Other entries matched -a as well as -?. One entry had the gall to have the csh invoke a Bourne shell script (is there no ethnic pride?!). This version matches -? only,using no other than the csh. I'd still be interested in any other approaches that work. But imagine that! Using brackets for quotes! Who would have ever thought that the C-shell, with its infinitely helpful programmer-oriented features, has this level of protection against matching metacharacters! :-) :*S Here's the essence of the original posting: > In trying to make my shell scripts understand a standard help inquiry, > I would like to have the csh recognize the flag "-?" , so that one might say: > gobble -\? > and have it echo: > gobble takes the flags: > -v Verbose > -o Output is directed to rather than the default > -? Prints this help message > ... -- Ken Turkowski @ CADLINC, Menlo Park, CA UUCP: {amd,decwrl,hplabs,nsc,seismo,spar}!turtlevax!ken ARPA: turtlevax!ken@DECWRL.ARPA