Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!bonnie!akgua!mcnc!decvax!genrad!panda!talcott!harvard!seismo!brl-tgr!tgr!rbbb@RICE.ARPA From: rbbb@RICE.ARPA (David Chase) Newsgroups: net.unix-wizards Subject: Environment variable brain damage Message-ID: <8554@brl-tgr.ARPA> Date: Sat, 23-Feb-85 18:47:32 EST Article-I.D.: brl-tgr.8554 Posted: Sat Feb 23 18:47:32 1985 Date-Received: Wed, 27-Feb-85 05:56:57 EST Sender: news@brl-tgr.ARPA Lines: 34 Setting: Vax, Pyramid, Sun, or pdp-11 running csh and sh Program: csh/sh interaction Bug: Environment variables set in the C-shell may cause Bourne shell to freak out. Repeat-by: 1) Set an environment variable containing a hyphen (say "setenv A-B 1") 2) Type "sh" The result will be the message "A-B=1: is not an identifier", not a shell. 3) Unset that environment variable 4) Now type "sh" Or just run this file through the C shell. echo 'echo I am a shell file' > afile chmod +x afile setenv A-B 1 ./afile unsetenv A-B ./afile It will print: A-B=1: is not an identifier I am a shell file Fix: I dunno; as a "suggested workaround", don't set any environment variables like that in the csh. Enjoy, David Chase @ Rice University