csh bug
Chip Hitchcock
cjh at cca.UUCP
Thu May 22 04:45:40 AEST 1986
I first ran into this on a Sun-2/120 running Sun 2.2 (derived from 4.2BSD), but
found the same results on a 11/780 running 4.2 BSD.
With "0^J" (i.e., normal end-of-line character) in files xyzzy{,1}_no, this
#! /bin/csh
set xyzzy1_no = ` cat xyzzy1_no `
@ xyzzy1_no ++
and this
#! /bin/csh
set xyzzy_no = ` cat xyzzy_no `
@ xyzzy1_no = $xyzzy_no + 1
get "@: syntax error";
#! /bin/csh
set xyzzy_no = ` cat xyzzy_no `
@ xyzzy_no ++
and
#! /bin/csh
set xyzzy1_no = ` cat xyzzy1_no `
@ xyzzy_no = $xyzzy1_no + 1
work. This appears to me to be a bug, given the manual definition:
Shell variables have names consisting of up to
20 letters and digits starting with a letter. The
underscore character is considered a letter.
and the fact that the references to using @ says nothing to limit this.
Am I missing something? Any suggestions? (Yes, I can script around it, but it's
a nuisance. Changing the alpha part of the variable name doesn't alter the
results.)
CHip (Chip Hitchcock)
SUSHIDO -- the way of the tuna
ARPA: CJH at CCA-UNIX
uu: ...!{decvax, cbosgd, seismo!harvard, linus}!cca!cjh
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list