Re: variable with "-" sign
From: Keith Thompson (kst-u_at_mib.org)
Date: 04/03/05
- Next message: Janis Papanagnou: "Re: questions about colon ":" command"
- Previous message: Bill Seivert: "Re: removing tabs at beginning of a line"
- In reply to: c0ldbyte: "Re: variable with "-" sign"
- Next in thread: c0ldbyte: "Re: variable with "-" sign"
- Reply: c0ldbyte: "Re: variable with "-" sign"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 03 Apr 2005 21:43:07 GMT
c0ldbyte <c0ldbyte@comp.unix.shell> writes:
[...]
> Standardized scripting that is not something that would pass any kind of
> quiz with a proffessor. I do believe we have enough numbers, leters, and
> underscores to use and come up with some better descriptive variables
> than starting to use ones with hyphens. For those who dont know what a
> hyphen is its the little key on your keyboard that looks like "-" that.
> Now on to the real problem. Are you sure that the variable in question
> isnt really $UNIX-$VERS instead of $UNIX-VERS and that possibly its just
> a mistype in the file or something. Even if you should rewrite it if
> there is variables being used that contain a hyphen in the actual variable
> name and then create a patch and write the stupid author and send the
> patch to him to make it easy on his life to fix the problem as hand
> because he wrote a non POSIX conforming script.
There's no reason to assume that the offending application is a
script. If it's a C program, for example, the way to read an
environment variable is the same regardless of what characters the
name contains: getenv("UNIX-VERS") vs. getenv("UNIX_VERS")
-- Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst> San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst> We must do something. This is something. Therefore, we must do this.
- Next message: Janis Papanagnou: "Re: questions about colon ":" command"
- Previous message: Bill Seivert: "Re: removing tabs at beginning of a line"
- In reply to: c0ldbyte: "Re: variable with "-" sign"
- Next in thread: c0ldbyte: "Re: variable with "-" sign"
- Reply: c0ldbyte: "Re: variable with "-" sign"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|