Testing functions and position arguments. First is simply that the original positional arguments are preserved. $ cat > test.sh << EOF > echo "\$1 from \$0" > EOF $ sh test.sh hello hello from test.sh $ msh test.sh hello hello from test.sh Next, do they work inside function definitions! $ cat > test.sh << EOF > shout () { > echo \$0 > echo \$1 | tr a-z A-Z > } > shout "hi there" > EOF $ sh test.sh test.sh HI THERE $ msh test.sh test.sh HI THERE Redirection and exit codes should be preserved to just like any other command. $ cat > test.sh << EOF > goodbye () { > echo "eybdoog" > exit \$1 > } > goodbye 0 | rev > goodbye 1 | rev > goodbye 128 > EOF $ sh test.sh goodbye goodbye eybdoog [128] $ msh test.sh goodbye goodbye eybdoog [128]