1 # try running this with bash, ksh, ash, and hush.
3 # simple quoting rules.
13 # quick and painless exit for lash
14 if false; then true; exit; fi
16 # fairly simple command substitution
17 echo `echo -e foo\\\necho bar`
19 echo THIS IS A TEST >foo
20 cat $(echo FOO | tr 'A-Z' 'a-z')
21 cat foo | tr 'A-Z' 'a-z'
22 cat $(echo FOO | tr 'A-Z' 'a-z') | tr 'A-Z' 'a-z'
24 cat foo | if true; then tr 'A-Z' 'a-z'; else echo bar1; fi
25 cat foo | if false; then tr 'A-Z' 'a-z'; else echo bar2; fi
26 if true; then tr 'A-Z' 'a-z'; else echo bar3; fi <foo
27 if false; then tr 'A-Z' 'a-z'; else echo bar4; fi <foo
28 if true || false; then echo foo; else echo bar5; fi
29 if true && false; then echo bar6; else echo foo; fi
31 # fairly simple example of hush expanding variables too early
37 # ash, lash, and hush do not create fish; bash and ksh do.
38 # Thanks to Tapani Tarvainen <tt@mit.jyu.fi> for this stress test.
44 # The following example shows that hush's parser is
45 # not _really_ Bourne compatible
46 echo "echo Hello World" >"a=b"
53 # assuming the shell wasn't too buggy, clean up the mess