Re: two 11.31 boxes, one unusual environment issue... (116 Views)
Reply
Regular Advisor
Manuel Contreras
Posts: 172
Registered: ‎02-02-1999
Message 1 of 5 (116 Views)

two 11.31 boxes, one unusual environment issue...

On one box, I can perfom the following:

unixID> cd /$EDI_TOP/$1
[/apps/finapps/custom/edi/1.0]-tphr12
unixID>


On the other, I can't:

unixID> cd /$EDI_TOP/$1
ksh: 1: parameter not set
[/tmp]-tphtr12
unixID>


Seems like one box ignores $1 (if it doesn't exist), while the other complains when isn't passed :(

any ideas?

thanks,
manny
Please use plain text.
Regular Advisor
Manuel Contreras
Posts: 172
Registered: ‎02-02-1999
Message 2 of 5 (116 Views)

Re: two 11.31 boxes, one unusual environment issue...

discovered the following:

set -u
you get the parm. not set


set +u
no issues :)

now just need to identify where this "set" is being set...

thanks

Please use plain text.
Honored Contributor
Mel Burslan
Posts: 3,212
Registered: ‎08-26-1998
Message 3 of 5 (116 Views)

Re: two 11.31 boxes, one unusual environment issue...

What you are telling did not make any sense. $1 is used for the first argument after the command itself. in a cd command, unless "cd" keyword is aliased to run a different script, $1 at the end of the directory you specify is not meaningful.

Please provide the output to command

alias

from both systems, separately, so that we can figure out if such an alias exists.
________________________________
UNIX because I majored in cryptology...
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,700
Registered: ‎03-06-2006
Message 4 of 5 (116 Views)

Re: two 11.31 boxes, one unusual environment issue...

>set -u # you get the parm. not set
>now just need to identify where this "set" is being set.

Are you in a script or at the command prompt?
Typically you would rarely use $1 at the command prompt.

Look for "set -u" in .profile or in any .kshrc files. Or "-u" on your #! line at the top of your scripts.

Also look for "set nounset".
Please use plain text.
Honored Contributor
Viktor Balogh
Posts: 1,007
Registered: ‎03-15-2009
Message 5 of 5 (116 Views)

Re: two 11.31 boxes, one unusual environment issue...

Hi,

you can issue a "set -o" at the command prompt on each server and compare the results. This will tell you what features are turned on/off on your (ksh) shell.

Regards,
Viktor
****
Unix operates with beer.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation