A2osX/ROOT/shtest/sh3.txt
2025-01-19 17:12:51 +01:00

53 lines
688 B
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
AUTO 3,1
#!/bin/sh
set -f
echo before function ...
function TESTF1
{
echo "TESTF1: ARGS : $0 $1 $2 $3"
echo HOME : ${HOME}
pause
if [ $1 -eq 2 ];exit $1 + 1;fi
echo normal exit
}
function TESTF2 {
echo in TESTF2: HOME = ${HOME}
}
echo before call : ARG0=$0 ARG1=$1
pause
call TESTF1 2 SOME ARGS
echo after : RC = $? ARG0=$0 ARG1=$1
echo before call testf2
pause
set -x
call TESTF2
pause
echo after call TESTF2
pause
set -e
echo Calling sh2...
sh2
echo sh2 exit code = $?
pause
if [ -f $0 ]
echo "file $0 exists"
else
echo "-f $0 test failed"
fi
echo end of test
MAN
TEXT root/shtest/sh3