: etsh - " Force sh(1), csh(1), and other shells to exit w/ error! " <'' ;;; : : " The author of this file, J.A. Neitzel , " : " hereby grants it to the public domain. " : : " From: https://etsh.nl/tests " : : : test06 - Aliases : if $# = # if { fd2 -e echo Invalid shell - etsh\(1\) required } \ if { exit } if A = B echo Begin ... alias if $? = 1 echo 0 Aliases Set alias tests "echo test??^tr ' ' '\n';:" alias logs "echo *.log^tr ' ' '\n';:" alias TestCounts "echo Test*Count^tr ' ' '\n';:" alias HelloWorld "echo 'Hello World!'^cat^cat^cat^cat^cat^cat^cat^cat^cat^grep '^H';:" alias All "echo *^tr ' ' '\n';:" ( alias ) >/dev/null if $? = 1 if { fd2 -e echo Unexpected alias result } if { exit } if A = B ( alias ) ^ wc -l ^ tr -d ' \t\n' ; echo ' Aliases Set' ( alias ) ^ awk '{ print NR "\t" $0 }' echo HelloWorld ...;HelloWorld^awk '{ print NR "\t" $0 }';echo HelloWorld . echo All ...; All ;echo All . echo tests ...; tests ^awk '{ print NR "\t" $0 }';echo tests . echo logs ...; logs ^awk '{ print NR "\t" $0 }';echo logs . echo TestCounts ...;TestCounts^awk '{ print NR "\t" $0 }';echo TestCounts . unalias tests unalias logs unalias TestCounts unalias HelloWorld unalias All alias if $? = 1 echo 0 Aliases Set echo End .