Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!sri-unix!quintus!sun!pitstop!sundc!seismo!uunet!littlei!ogcvax!schaefer From: schaefer@ogcvax.UUCP (Barton E. Schaefer) Newsgroups: comp.unix.wizards Subject: Re: csh oddity Message-ID: <1530@ogcvax.UUCP> Date: 12 Jan 88 19:09:57 GMT References: <826@murphy.UUCP> <590@devon.UUCP> Reply-To: schaefer@ogcvax.UUCP (Barton E. Schaefer) Organization: Oregon Graduate Center, Beaverton, OR Lines: 28 Posted: Tue Jan 12 11:09:57 1988 In article hansen@mips.UUCP (Craig Hansen) writes: >In article <826@murphy.UUCP> dcornutt@murphy.UUCP (Dave Cornutt) writes: >> I have discovered something peculiar about csh variable substitution. Is >> this a bug or am I doing something wrong? > >You're doing something wrong. The correct syntax is: > >% set xy1z={$xy1z}_123 >-- >Craig Hansen Sorry, Craig, that syntax changes the meaning of the {} from "variable substitution" to "filename substitution" as in % set xy1z="one,two,three" % set xyz={$xy1z}_step % set xy1z one,two,three xyz (one_step two_step three_step) The syntax ${xy1z} SHOULD work, but it doesn't (confirmed here for Mt. Xinu 4.3 BSD csh as well). Does anyone happen to know why it fails? Does it have anything to do with ${1} being a synonym for $1 (and ${2} for $2 and so on)? -- Bart Schaefer CSNET: schaefer@cse.ogc.edu UUCP: ...{tektronix,verdix}!ogcvax!schaefer "A band of BIG, DUMB, LOUDMOUTHED, BUNGLING OGRES is a GREAT ASSET to the neighbohood. It keeps out the RIFF-RAFF." -- Wormy