Newer
Older
UbixOS / bin / sh / tests / execution / shellproc1.0
@Charlie Root Charlie Root on 16 Jan 2018 326 bytes BSD Shell
# $FreeBSD: releng/11.1/bin/sh/tests/execution/shellproc1.0 218205 2011-02-02 22:03:18Z jilles $

T=`mktemp -d "${TMPDIR:-/tmp}/sh-test.XXXXXXXX"` || exit
trap 'rm -rf "${T}"' 0
cat <<EOF >"$T/testshellproc"
printf 'this '
echo is a test
EOF
chmod 755 "$T/testshellproc"
PATH=$T:$PATH
[ "`testshellproc`" = "this is a test" ]