Thursday, March 24, 2005

Solaris scripts debuging

I have startted to work today on Solaris.
I felt quite excited of the event. It was always one of my desires to work with Solaris and Sun hardware. Today I looked on a strange behaviour on a Korn shell script.
I could't have some variable set. I made various tests and finally I found out why.
I have setted the variable to a custom value at the beginning of the script:

#!/bin/ksh
FOO="bar"

...
Several lines later the original author did something like:


if [ -f ~/.profile ]; then
. ~/.profile
fi


No need to say that FOO was resetted to its defaults in .profile.

Anyway Solaris seems nice. Except for the fact that the console works awfull and the version of vi is antique. Unfortunatelly I cannot install software on the machine...

No comments:

Post a Comment