Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!umd5!uvaarpa!mcnc!gatech!ufcsv!codas!novavax!murphy!dcornutt From: dcornutt@murphy.UUCP (Dave Cornutt) Newsgroups: comp.unix.wizards Subject: csh oddity Message-ID: <826@murphy.UUCP> Date: 7 Jan 88 13:27:11 GMT Organization: Gould CSD, Fort Lauderdale, FL Lines: 43 Keywords: csh variables substitution I have discovered something peculiar about csh variable substitution. Is this a bug or am I doing something wrong? Watch this: example 1: % set xyz=qwert % echo $xyz qwert % set xyz=${xyz}_123 % echo $xyz qwert_123 % example 2: % set xy1z=qwert % echo $xy1z qwert % set xy1z=${xy1z}_123 Variable syntax. % echo $xy1z qwert % Note that the only difference between these two examples is in the variable name. After further experimenting, I discovered that the ${foo} form seems to choke whenever the variable name has a digit in it; variable names consisting solely of lower-case alphabetics always work. (I haven't tried using other characters.) I tried quoting the string in various ways, none of which made any difference. Has anyone ever seen this? Is it a bug, or did I just get up too early? The OS involved here is UTX/32, rev 2.0, which is BSD4.3 based. However, I have gotten the same results on Sun 3.2, which is 4.2-based, so I think it's generic to csh. Any hints? --- Dave Cornutt, Gould Computer Systems, Ft. Lauderdale, FL [Ignore header, mail to these addresses] UUCP: ...!{sun,pur-ee,brl-bmd,uunet,bcopen,rb-dc1}!gould!dcornutt or ...!{codas,mia,hrshcx}!novavax!gould!dcornutt paths to codas: allegra,ucf-cs,peora,killer,burl,mtune,ufsvax2,flnexus,toynix ARPA: dcornutt@gswd-vms.gould.com "The opinions expressed herein are not necessarily those of my employer, not necessarily mine, and probably not necessary."