f34da8442c
exit status of the previous command ($?). Fixed long ago on -current, but forgot to commit this test...
22 lines
177 B
Bash
Executable File
22 lines
177 B
Bash
Executable File
#!/bin/sh
|
|
|
|
check() {
|
|
if [ "$1" != "$2" ]
|
|
then
|
|
echo "expected [$2], found [$1]" 1>&2
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
crud() {
|
|
|
|
test yes = no
|
|
|
|
cat <<EOF
|
|
$?
|
|
EOF
|
|
}
|
|
|
|
foo=`crud`
|
|
check x$foo x1
|