probs w/ '$' in envir. variables--eg, C$TEST
Eddie Kuns
ekuns at zodiac.rutgers.edu
Tue Oct 10 04:08:04 AEST 1989
I'm having trouble with environment variables (cshell) with dollar signs in
the middle of them. This is on a MIPS/M120 computer with an R2000 processor.
On signing on, I get the message "RISC/os (UMIPS) 4.0".
The following sequence of commands fails:
setenv 'C$TEST' ~level3
man setenv
I get the message:
C$TEST=/usr1/user1/level3: is not an identifier
and never see any text from the man page. (I get the same error message when
trying to execute any command, not just 'man'!) I tried the same commands
under Ultrix (on a DECStation) and on a Sun with no problems. Does anyone
have an idea how I can get around this "feature?" (When I run a Fortran
program that uses getenv to get the value of the variable, it works.)
Also, once this works, how can I use the value of this variable? <cd $C$TEST>
doesn't work! (It tells me that "C" is an undefined variable.) <cd $C\$TEST>
also doesn't work. I've tried everything I can think of. Is my only option
to write a program that uses getenv() to get that value? Is it possible to
get this value in a shell script?
Why do I insist on putting dollar signs in the middle of environment
variables? Well, I'm porting a HUGE piece of software from VMS to UNIX. This
software is full of VMS logical names, most of which contain dollar signs in
the middle! It would be very painful to change all those logical names, so
I'm trying to use environment variables as VMS logical names wherever
possible.
Please respond to one of the below addresses. The news program here seems to
be unstable. (It runs under VMS!) I'll post a summary of replies if people
express a desire for it.
--
/--------------+----------------------------------+--------------------------\
| | bitnet: EKuns at zodiac | 2005 Tall Oaks Drive #2A |
| Eddie Kuns | domain: EKuns at zodiac.rutgers.edu | Aurora, IL 60505 |
| | Delphi: EddieKuns | (312) 820-3943 |
+--------------+----------------------------------+--------------------------+
| Note: You can subsitute Cancer or Pisces for Zodiac if you have problems. |
\----------------------------------------------------------------------------/
More information about the Comp.unix.questions
mailing list