Path: utzoo!mnetor!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!mailrus!ames!ucsd!sdcsvax!ucsdhub!hp-sdd!hplabs!hpda!hpcuhb!hpcllla!hpclisp!hpclscu!shankar From: shankar@hpclscu.HP.COM (Shankar Unni) Newsgroups: comp.unix.wizards Subject: csh and globbing in `..` Message-ID: <670009@hpclscu.HP.COM> Date: 10 Mar 88 23:13:54 GMT Organization: HP ITG/ISD Computer Language Lab Lines: 48 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%% YACW (Yet Another Csh Weirdness). %%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I'm trying to set a shell variable to contain the output of a command. For instance, set myvar = `grep 'Compile' RESULTS` This is what happens: % ls RESULTS bar bletch foo % grep 'Compile' RESULTS * Compile successful % set line = `grep Compile RESULTS` % echo $line RESULTS bar bletch foo Compile successful (!!) Actually, I sort of understand (I think) what's going on here. The `` globs the *. OK, OK. Now, how do I disable this globbing? I've tried: % grep .. > /tmp/XXX % set line = `cat /tmp/XXX` with the same results (obviously, as I see now..) I finally had to do something gross like creating an awk script like {print "set line='" $0 "'"} and try grep .. | awk -f awkscript > /tmp/YYY source /tmp/YYY (AAARGH!!) Is there an easier (and more elegant) way to do this? I also tried setting noglob (which was calmly ignored by the ``), so *that*'s not the answer either.. (Almost makes me want to switch to "ksh" Hahhahhahhehheh..errr..) ADVthanksANCE, Shankar.