: etsh - " Force sh(1), csh(1), and other shells to exit w/ error! " <'' ;;;
:
: "  The author of this file, J.A. Neitzel <jan (at) etsh (dot) nl>,  "
: "  hereby grants it to the public domain.                           "
:
: "  From:  https://etsh.nl/tests  "
:

:
: test07 - Variable substitution
:

if $# = # if { fd2 -e echo Invalid shell - etsh\(1\) required } \
	if { exit } if A = B

echo Begin ...
set
if $? = 1 echo 0 Variables Set
set	E	"echo test??^tr ' ' '\n'"
set	D	"echo *.log^tr ' ' '\n'"
set	C	"echo Test*Count^tr ' ' '\n'"
set	B	"echo 'Hello World!'^cat^cat^cat^cat^cat^cat^cat^cat^cat^grep '^H'"
set	A	"echo *^tr ' ' '\n'"
set	a	a...
set	b	b...
set	c	c...
set	X	X...
set	Y	Y...
set	Z	Z...
( set ) >/dev/null
if $? = 1 if { fd2 -e echo Unexpected set result } if { exit } if A = B
( set ) ^ wc -l ^ tr -d ' \t\n' ; echo ' Variables Set'
( set ) ^ awk '{ print NR "\t" $0 }'
echo \$B ...;$B^awk '{ print NR "\t" $0 }';echo \$B .
echo \$A ...;$A                           ;echo \$A .
echo \$E ...;$E^awk '{ print NR "\t" $0 }';echo \$E .
echo \$D ...;$D^awk '{ print NR "\t" $0 }';echo \$D .
echo \$C ...;$C^awk '{ print NR "\t" $0 }';echo \$C .
echo \$a \$b \$c ...;echo $a $b $c;echo \$a \$b \$c .
echo \$X \$Y \$Z ...;echo $X $Y $Z;echo \$X \$Y \$Z .
unset	E D C B A a b c X Y Z
set
if $? = 1 echo 0 Variables Set
echo End .
