argv@ucb-vax.ARPA (04/10/85)
% 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) -------------------------------------------------------------------------------
root%bostonu.csnet@CSNET-RELAY.ARPA (BostonU SysMgr) (04/11/85)
>From: "Dan Heller (aka Frank" <ucscc!argv@UCB-VAX.ARPA> >Message-Id: <8504092347.AA13726@ucscc.UCSC> >To: unix-wizards@BRL.ARPA >Subject: 4.2 quirks... >Received: from CSNet-Relay by bostonu; 11 Apr 85 10:19:55-EST (Thu) > >% mkdir foo >% chmod 000 foo >% cd foo >foo: no such file or directory >% WHAT? >no match. I assume you are surprised by by the fact that shutting off the permissions to a directory you own makes it impossible for you to change to it. That's not a quirk, that's a bona-fide feature. What else could turning off your own permissions mean? Why have them? I personally find this a real plus under UNIX in general, it's *nice* to be able to protect me from me as usually my files are in the gravest danger from *me*. -Barry Shein, Boston University