Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!tgr!ucscc!argv@ucb-vax.ARPA From: argv@ucb-vax.ARPA Newsgroups: net.unix-wizards Subject: 4.2 quirks... Message-ID: <9846@brl-tgr.ARPA> Date: Wed, 10-Apr-85 08:38:58 EST Article-I.D.: brl-tgr.9846 Posted: Wed Apr 10 08:38:58 1985 Date-Received: Fri, 12-Apr-85 06:13:48 EST Sender: news@brl-tgr.ARPA Lines: 52 % mkdir foo % chmod 000 foo % cd foo foo: no such file or directory % WHAT? no match. % touch bar % chmod 777 bar % bar at this point, my .csrhc is being sourced... and after that, it sits there.. shouldn't it only exec a csh if the first char is a #? That's what it says in OUR manual. Next fun item: #!/bin/csh -f echo -n "Go: " set foo = $< if ($foo =~ *\ *) echo true echo done This simple little ditty is supposed to check to see if there exists a space in the variable "foo" that got it's value from the keyboard. If there is no space, everything is fine -- it doesn't satisfy the expression. If there IS a space, we get: if: expression syntax. fooey. I found I had to enclose $foo in double quotes in order for the expression to work. And it does. Can someone please explain to me what shell script does with strings so that this is necessary? Dan Heller (aka Frank) ------------------------------------------------------------------------------ UCSC Computing Center Consultant (Looking for a UNIX/C hacking Job - nudge nudge wink wink) UUCP: ucbvax!ucscc!argv {ihnp4,sun,cbosgd,decwrl}!qubix!ucscc!argv ARPA: argv%ucscc.uucp@ucb-vax.arpa CSnet: c.argv@ucsc.csnet (say no more, say no more) -------------------------------------------------------------------------------