Definition of "identifier" in /bin/sh

Ron Kuris ron at rdk386.UUCP
Mon Jul 24 07:30:11 AEST 1989


Does anyone know what the definition of an "identifier" is in the
bourne shell?  I seem to be getting this nasty error message whenever
I start up a bourne shell with some goop in my environment, and want
to know what's legal and illegal in environment variable names,
according to the bourne shell.

Here's an example of something that fails royally on every machine
that I've tried:

5@ csh
% setenv \$\(x\) 1
% env
MAIL=/usr/spool/mail/ron
HOME=/u/ron
PS1=!#@ 
TERM=ansi
PATH=/u/ron/bin:/u/ron/fash%func:/bin:/usr/bin:/usr/local/bin:.
HZ=50
SHELL=/bin/ash
TZ=PST8PDT
SHINIT=history -n 100
$(x)=1
% sh
$(x)=1: is not an identifier
% csh
% exit
% exit
6@ 

Does anyone have "sh" source so they can look it up?  You can come
up with a simpler case (just putting $=1 in your environment causes
the shell to choke, for example).

I looked through the sh(1) man page and the environ man page, and
couldn't find anything about identifier restrictions.

E-mail is preferred -- I'll summarize if asked.
-- 
/-----------------------------------\/\/\/\
| {unify|{sactoh0!siva}}!rdk386!ron | o o |
| uucp now, cu later.   (Ron Kuris) |  -  |
\-----------------------------------/ awk \



More information about the Comp.unix.wizards mailing list