Hello,
i have a little problem with the ERRNO variable.
I am create this script ( named test.sh ) :
#!/bin/ksh
export ERRNO=0
echo "\$ERRNO : $ERRNO"
rm -f /tmp/file.txt
echo "\$ERRNO : $ERRNO"
. /tmp/essai.sh
( The /tmp/file.txt does not exist )
And in /tmp/essai.sh :
#!/bin/ksh
echo "\$ERRNO : $ERRNO"
When i execute the test.sh script :
ERRNO : 0
ERRNO : 2
ERRNO : 25
So i lost the ERRNO variable when i invoquing an other script (in the same shell !)!
There is a solution : put the ERRNO variable in an other variable before invoking /tmp/essai.sh, but i don't want.
I want use ERRNO (ERRNO=2) in the /tmp/essai.sh script.
Do you know a solution (pehaps with an option of ksh or the set command )
Thanks.
i have a little problem with the ERRNO variable.
I am create this script ( named test.sh ) :
#!/bin/ksh
export ERRNO=0
echo "\$ERRNO : $ERRNO"
rm -f /tmp/file.txt
echo "\$ERRNO : $ERRNO"
. /tmp/essai.sh
( The /tmp/file.txt does not exist )
And in /tmp/essai.sh :
#!/bin/ksh
echo "\$ERRNO : $ERRNO"
When i execute the test.sh script :
ERRNO : 0
ERRNO : 2
ERRNO : 25
So i lost the ERRNO variable when i invoquing an other script (in the same shell !)!
There is a solution : put the ERRNO variable in an other variable before invoking /tmp/essai.sh, but i don't want.
I want use ERRNO (ERRNO=2) in the /tmp/essai.sh script.
Do you know a solution (pehaps with an option of ksh or the set command )
Thanks.