Hello,
i am agree with you MikeLacey, the only solution i find is to put ERRNO in an exporting variable and use it in the other script.
But i don't understand why, when i call the script /tmp/essai.sh, ERRNO is already in 25.
In fact, i want the last system error (in the script it is 2 because file.txt does not exist), and i want use it in a second script (/tmp/essai.sh). But, in the second script, it is automatically 25.
Thanks.
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 ...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.