Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-adm!brl-smoke!nlm-mcs!nlm-vax!lef From: lef@nlm-vax.ARPA (Larry Fitzpatrick) Newsgroups: net.unix-wizards,net.bugs.4bsd Subject: Re: C-Shell weirdness Message-ID: <5@nlm-vax.ARPA> Date: Wed, 2-Apr-86 12:52:44 EST Article-I.D.: nlm-vax.5 Posted: Wed Apr 2 12:52:44 1986 Date-Received: Sat, 5-Apr-86 08:31:32 EST References: <676@nbires.UUCP> <344@hadron.UUCP> Reply-To: lef@nlm-vax.UUCP (Larry Fitzpatrick) Distribution: net Organization: NLM/LHNCBC, Bethesda, Md. Lines: 17 Xref: watmath net.unix-wizards:17451 net.bugs.4bsd:2037 In article <344@hadron.UUCP> jsdy@hadron.UUCP (Joseph S. D. Yao) writes: >Your alternative is actually a venerable shell-script idiom to cancel >the flag effect of the "-". However, you really should put $arg in >double-quotes to negate the effect of an in-valid string: > set arg = "-b -e" > if (x$arg == '-b') >becomes > if (x-b -e == '-b') >with who knows what syntax error reports. I'd use: > if ("X$arg" == "X-b") ... if ("$arg" == "-b") echo is sufficient regards, fitz lef@nlm-vax