Lines Matching full:echo
37 echo ${KSH_VERSION%%' +'*}
46 echo ${KSH_VERSION%%' +'*}
94 echo ${foo:-baz}
103 echo ${foo:-baz}
112 echo "<$ENV>"
140 ln -s "$__progname" echo || cp "$__progname" echo
141 ./echo -c 'echo foo' | ./cat -u
143 -c echo foo
191 alias Echo='echo '
194 Echo fooBar
196 Echo fooBar
206 alias Echo='echo '
208 while false; do echo hi ; done
209 Echo while
217 alias Echo='echo '
222 Echo foo blah
230 alias Echo='echo '
234 Echo foo blah
245 X Y in 'Y') echo is y ;; Z) echo is z ;; esac
256 echo hi
260 echo there
281 echo = now
284 echo = out
299 echo $(bar)
327 alias echo=print
328 x() { echo a; (echo b); x=$(echo c); }
331 { OPEN echo hi1; CLOSE }
332 var=`{ OPEN echo hi2; CLOSE }` && echo "$var"
333 var=$({ OPEN echo hi3; CLOSE }) && echo "$var"
359 echo $((1 ? 20 : (x+=2)))
360 echo $i,$x
361 echo $((0 ? (y+=2) : 30))
362 echo $j,$y
377 echo $((1 ? 20 : (x+=2)))
378 echo $i,$x
379 echo $((0 ? (y+=2) : 30))
380 echo $i,$y
394 echo = $x $y =
404 echo "($n, $m)"
405 m=0; echo $(( 0 ? ++m : 2 )); echo $m
406 m=0; echo $(( 0 ? m++ : 2 )); echo $m
417 a=0; echo "$((0&&b[a++],a))"
424 a=0; echo "$((0&&(b[a++]),a))"
431 a=0 b=a++; ((0&&b)); echo $a
438 a=0 b=a++; ((0&&(b))); echo $a
445 a=0; echo "$((0?b[a++]:999,a))"
452 a=0; echo "$((0?(b[a++]):999,a))"
459 a=0; echo "$((1?999:b[a++],a))"
466 a=0; echo "$((1?999:(b[a++]),a))"
485 echo $((0 ? x+=2 : 20))
505 echo $((20 / 2 / 2))
513 x=$(echo $((1 / 0)))
514 echo =$?:$x.
525 echo signed:$((-2147483648 / -1))r$((-2147483648 % -1)).
526 echo unsigned:$((# -2147483648 / -1))r$((# -2147483648 % -1)).
536 echo signed:$((-9223372036854775808 / -1))r$((-9223372036854775808 % -1)).
537 echo unsigned:$((# -9223372036854775808 / -1))r$((# -9223372036854775808 % -1)).
547 echo $((i += j += k))
548 echo $i,$j,$k
602 echo x1 $((-1)) $((#-1))
607 echo x2 $vs $vu
610 echo x3 $vs $vu
614 echo x4 $vs $vu
617 echo x5 $vs $vu
619 echo x6 $((# vs % 2147483647)) $((# vu % 2147483647))
624 echo x7 ${va[#4123456789%2147483647]}
627 echo x8 $mca $mcb
644 echo x1 $((-1)) $((#-1))
649 echo x2 $vs $vu
651 echo x3 $vs $vu
653 echo x4 $vs $vu
655 echo x5 $vs $vu
657 echo x6 $vs $vu
672 echo x1 $((-1)) $((#-1))
677 echo x2 $vs $vu
679 echo x3 $vs $vu
681 echo x4 $vs $vu
683 echo x5 $vs $vu
685 echo x6 $vs $vu
698 echo hi #there \
699 echo folks
708 echo 'hi \
710 echo folks
735 alias x='echo hi
757 echo `echo foo\\`bar
758 echo hi\
772 echo hi\
785 echo $\
787 echo $a\
789 echo $\
791 echo ${a\
793 echo ${ab\
807 echo $\
808 (echo foobar1)
809 echo $(\
810 echo foobar2)
811 echo $(echo foo\
813 echo $(echo foobar4\
815 echo `
816 echo stuff1`
817 echo `echo st\
832 echo $\
834 echo $(\
836 echo $((\
838 echo $((1+\
840 echo $((1+2+3+4+5+6)\
853 echo "\
855 echo "foo\
857 echo "folks\
880 echo done
899 echo done
912 echo hi &\
913 & echo there
914 echo foo |\
915 | echo bar
929 echo hi >\
931 echo $?
937 ) echo hi;\
939 (*) echo oops
957 alias x='echo hi\'
959 echo there
969 echo pass; el\
970 se echo fail; fi
988 ) echo ok ;;
989 *) echo bad
1005 echo $i
1013 for i in a b c; do echo $i; break; echo bad-$i; done
1014 echo end-1
1015 for i in a b c; do echo $i; break 1; echo bad-$i; done
1016 echo end-2
1019 echo $i:$j
1021 echo bad-$i
1023 echo end-$i
1025 echo end-3
1026 for i in a b c; do echo $i; eval break; echo bad-$i; done
1027 echo end-4
1049 echo $i:$j
1051 echo bad-$i
1053 echo end-$i
1055 echo end
1074 for i in a b c; do echo $i; break 2; echo bad-$i; done
1075 echo end
1086 for i in a b c; do echo $i; break abc; echo more-$i; done
1087 echo end
1098 for i in a b c; do echo $i; continue; echo bad-$i ; done
1099 echo end-1
1100 for i in a b c; do echo $i; continue 1; echo bad-$i; done
1101 echo end-2
1104 echo $i:$j
1106 echo bad-$i-$j
1108 echo end-$i
1110 echo end-3
1111 for i in a b c; do echo $i; eval continue; echo bad-$i ; done
1112 echo end-4
1146 echo $i:$j
1148 echo bad-$i-$j
1150 echo end-$i
1152 echo end
1173 for i in a b c; do echo $i; continue 2; echo bad-$i; done
1174 echo end
1187 for i in a b c; do echo $i; continue abc; echo more-$i; done
1188 echo end
1368 echo 0=$?
1371 echo 1=$?,${PWD#$bwd/}
1374 #echo pwd=$?,$epwd
1378 echo 2=$?,${PWD#$bwd/}
1385 echo "now with -e:"
1403 false && echo hmmm
1407 echo hi${XXX}there
1420 (echo 1 ${IFS+'}'z}) 2>/dev/null || echo failed in 1
1421 (echo 2 "${IFS+'}'z}") 2>/dev/null || echo failed in 2
1422 (echo 3 "foo ${IFS+'bar} baz") 2>/dev/null || echo failed in 3
1423 (echo -n '4 '; ./pfn "foo ${IFS+"b c"} baz") 2>/dev/null || echo failed in 4
1424 (echo -n '5 '; ./pfn "foo ${IFS+b c} baz") 2>/dev/null || echo failed in 5
1425 (echo 6 ${IFS+"}"z}) 2>/dev/null || echo failed in 6
1426 (echo 7 "${IFS+"}"z}") 2>/dev/null || echo failed in 7
1427 (echo 8 "${IFS+\"}\"z}") 2>/dev/null || echo failed in 8
1428 (echo 9 "${IFS+\"\}\"z}") 2>/dev/null || echo failed in 9
1429 (echo 10 foo ${IFS+'bar} baz'}) 2>/dev/null || echo failed in 10
1430 (echo 11 "$(echo "${IFS+'}'z}")") 2>/dev/null || echo failed in 11
1431 (echo 12 "$(echo ${IFS+'}'z})") 2>/dev/null || echo failed in 12
1432 (echo 13 ${IFS+\}z}) 2>/dev/null || echo failed in 13
1433 (echo 14 "${IFS+\}z}") 2>/dev/null || echo failed in 14
1434 …u=x; (echo -n '15 '; ./pfs "foo ${IFS+a"b$u{ {"{{\}b} c ${IFS+d{}} bar" ${IFS-e{}} baz; echo .) 2>…
1435 l=t; (echo 16 ${IFS+h`echo -n i ${IFS+$l}h`ere}) 2>/dev/null || echo failed in 16
1436 l=t; (echo 17 ${IFS+h$(echo -n i ${IFS+$l}h)ere}) 2>/dev/null || echo failed in 17
1437 l=t; (echo 18 "${IFS+h`echo -n i ${IFS+$l}h`ere}") 2>/dev/null || echo failed in 18
1438 l=t; (echo 19 "${IFS+h$(echo -n i ${IFS+$l}h)ere}") 2>/dev/null || echo failed in 19
1439 l=t; (echo 20 ${IFS+h`echo -n i "${IFS+$l}"h`ere}) 2>/dev/null || echo failed in 20
1440 l=t; (echo 21 ${IFS+h$(echo -n i "${IFS+$l}"h)ere}) 2>/dev/null || echo failed in 21
1441 l=t; (echo 22 "${IFS+h`echo -n i "${IFS+$l}"h`ere}") 2>/dev/null || echo failed in 22
1442 l=t; (echo 23 "${IFS+h$(echo -n i "${IFS+$l}"h)ere}") 2>/dev/null || echo failed in 23
1443 key=value; (echo -n '24 '; ./pfn "${IFS+'$key'}") 2>/dev/null || echo failed in 24
1444 …key=value; (echo -n '25 '; ./pfn "${IFS+"'$key'"}") 2>/dev/null || echo failed in 25 # ksh93: “'$k…
1445 key=value; (echo -n '26 '; ./pfn ${IFS+'$key'}) 2>/dev/null || echo failed in 26
1446 key=value; (echo -n '27 '; ./pfn ${IFS+"'$key'"}) 2>/dev/null || echo failed in 27
1447 (echo -n '28 '; ./pfn "${IFS+"'"x ~ x'}'x"'}"x}" #') 2>/dev/null || echo failed in 28
1448 …u=x; (echo -n '29 '; ./pfs foo ${IFS+a"b$u{ {"{ {\}b} c ${IFS+d{}} bar ${IFS-e{}} baz; echo .) 2>/…
1449 (echo -n '30 '; ./pfs ${IFS+foo 'b\
1450 ar' baz}; echo .) 2>/dev/null || (echo failed in 30; echo failed in 31)
1451 (echo -n '32 '; ./pfs ${IFS+foo "b\
1452 ar" baz}; echo .) 2>/dev/null || echo failed in 32
1453 (echo -n '33 '; ./pfs "${IFS+foo 'b\
1454 ar' baz}"; echo .) 2>/dev/null || echo failed in 33
1455 (echo -n '34 '; ./pfs "${IFS+foo "b\
1456 ar" baz}"; echo .) 2>/dev/null || echo failed in 34
1457 (echo -n '35 '; ./pfs ${v=a\ b} x ${v=c\ d}; echo .) 2>/dev/null || echo failed in 35
1458 (echo -n '36 '; ./pfs "${v=a\ b}" x "${v=c\ d}"; echo .) 2>/dev/null || echo failed in 36
1459 (echo -n '37 '; ./pfs ${v-a\ b} x ${v-c\ d}; echo .) 2>/dev/null || echo failed in 37
1460 (echo 38 ${IFS+x'a'y} / "${IFS+x'a'y}" .) 2>/dev/null || echo failed in 38
1461 foo="x'a'y"; (echo 39 ${foo%*'a'*} / "${foo%*'a'*}" .) 2>/dev/null || echo failed in 39
1462 foo="a b c"; (echo -n '40 '; ./pfs "${foo#a}"; echo .) 2>/dev/null || echo failed in 40
1463 (foo() { return 100; }; foo; echo 41 ${#+${#:+${#?}}\ \}\}\}}) 2>/dev/null || echo failed in 41
1515 (echo "$1 plus norm foo ${v+'bar'} baz")
1516 (echo "$1 dash norm foo ${v-'bar'} baz")
1517 (echo "$1 eqal norm foo ${v='bar'} baz")
1518 (echo "$1 qstn norm foo ${v?'bar'} baz") 2>/dev/null || \
1519 echo "$1 qstn norm -> error"
1520 (echo "$1 PLUS norm foo ${v:+'bar'} baz")
1521 (echo "$1 DASH norm foo ${v:-'bar'} baz")
1522 (echo "$1 EQAL norm foo ${v:='bar'} baz")
1523 (echo "$1 QSTN norm foo ${v:?'bar'} baz") 2>/dev/null || \
1524 echo "$1 QSTN norm -> error"
1529 (echo "$1 plus parn foo ${v+(bar)} baz")
1530 (echo "$1 dash parn foo ${v-(bar)} baz")
1531 (echo "$1 eqal parn foo ${v=(bar)} baz")
1532 (echo "$1 qstn parn foo ${v?(bar)} baz") 2>/dev/null || \
1533 echo "$1 qstn parn -> error"
1534 (echo "$1 PLUS parn foo ${v:+(bar)} baz")
1535 (echo "$1 DASH parn foo ${v:-(bar)} baz")
1536 (echo "$1 EQAL parn foo ${v:=(bar)} baz")
1537 (echo "$1 QSTN parn foo ${v:?(bar)} baz") 2>/dev/null || \
1538 echo "$1 QSTN parn -> error"
1543 (echo "$1 plus brac foo ${v+a$u{{{\}b} c ${v+d{}} baz")
1544 (echo "$1 dash brac foo ${v-a$u{{{\}b} c ${v-d{}} baz")
1545 (echo "$1 eqal brac foo ${v=a$u{{{\}b} c ${v=d{}} baz")
1546 (echo "$1 qstn brac foo ${v?a$u{{{\}b} c ${v?d{}} baz") 2>/dev/null || \
1547 echo "$1 qstn brac -> error"
1548 (echo "$1 PLUS brac foo ${v:+a$u{{{\}b} c ${v:+d{}} baz")
1549 (echo "$1 DASH brac foo ${v:-a$u{{{\}b} c ${v:-d{}} baz")
1550 (echo "$1 EQAL brac foo ${v:=a$u{{{\}b} c ${v:=d{}} baz")
1551 (echo "$1 QSTN brac foo ${v:?a$u{{{\}b} c ${v:?d{}} baz") 2>/dev/null || \
1552 echo "$1 QSTN brac -> error"
1646 (echo $1 plus norm foo ${v+'bar'} baz)
1647 (echo $1 dash norm foo ${v-'bar'} baz)
1648 (echo $1 eqal norm foo ${v='bar'} baz)
1649 (echo $1 qstn norm foo ${v?'bar'} baz) 2>/dev/null || \
1650 echo "$1 qstn norm -> error"
1651 (echo $1 PLUS norm foo ${v:+'bar'} baz)
1652 (echo $1 DASH norm foo ${v:-'bar'} baz)
1653 (echo $1 EQAL norm foo ${v:='bar'} baz)
1654 (echo $1 QSTN norm foo ${v:?'bar'} baz) 2>/dev/null || \
1655 echo "$1 QSTN norm -> error"
1660 (echo $1 plus parn foo ${v+\(bar')'} baz)
1661 (echo $1 dash parn foo ${v-\(bar')'} baz)
1662 (echo $1 eqal parn foo ${v=\(bar')'} baz)
1663 (echo $1 qstn parn foo ${v?\(bar')'} baz) 2>/dev/null || \
1664 echo "$1 qstn parn -> error"
1665 (echo $1 PLUS parn foo ${v:+\(bar')'} baz)
1666 (echo $1 DASH parn foo ${v:-\(bar')'} baz)
1667 (echo $1 EQAL parn foo ${v:=\(bar')'} baz)
1668 (echo $1 QSTN parn foo ${v:?\(bar')'} baz) 2>/dev/null || \
1669 echo "$1 QSTN parn -> error"
1674 (echo $1 plus brac foo ${v+a$u{{{\}b} c ${v+d{}} baz)
1675 (echo $1 dash brac foo ${v-a$u{{{\}b} c ${v-d{}} baz)
1676 (echo $1 eqal brac foo ${v=a$u{{{\}b} c ${v=d{}} baz)
1677 (echo $1 qstn brac foo ${v?a$u{{{\}b} c ${v?d{}} baz) 2>/dev/null || \
1678 echo "$1 qstn brac -> error"
1679 (echo $1 PLUS brac foo ${v:+a$u{{{\}b} c ${v:+d{}} baz)
1680 (echo $1 DASH brac foo ${v:-a$u{{{\}b} c ${v:-d{}} baz)
1681 (echo $1 EQAL brac foo ${v:=a$u{{{\}b} c ${v:=d{}} baz)
1682 (echo $1 QSTN brac foo ${v:?a$u{{{\}b} c ${v:?d{}} baz) 2>/dev/null || \
1683 echo "$1 QSTN brac -> error"
1774 echo "${TEST:1:2:3}"
1775 echo $? but still living
1785 echo ${TEST:1:2:3}
1786 echo $? but still living
1796 echo ${#} # value of $#
1797 echo ${##} # length of $#
1798 echo ${##1} # $# trimmed 1
1800 echo ${##1}
1802 echo $? = ${#?} .
1804 echo $? = ${#?} .
1818 #echo "D: !=$! #=$# \$=$$ -=$- ?=$?"
1819 echo >&3 3 = s^${!-word} , ${#-word} , p^${$-word} , f^${--word} , ${?-word} .
1820 echo >&3 4 = ${!+word} , ${#+word} , ${$+word} , ${-+word} , ${?+word} .
1821 echo >&3 5 = s^${!=word} , ${#=word} , p^${$=word} , f^${-=word} , ${?=word} .
1822 echo >&3 6 = s^${!?word} , ${#?word} , p^${$?word} , f^${-?word} , ${??word} .
1823 echo >&3 7 = sl^${#!} , ${##} , pl^${#$} , fl^${#-} , ${#?} .
1824 echo >&3 8 = sw^${%!} , ${%#} , pw^${%$} , fw^${%-} , ${%?} .
1825 echo >&3 9 = ${!!} , s^${!#} , ${!$} , s^${!-} , s^${!?} .
1826 echo >&3 10 = s^${!#pattern} , ${##pattern} , p^${$#pattern} , f^${-#pattern} , ${?#pattern} .
1827 echo >&3 11 = s^${!%pattern} , ${#%pattern} , p^${$%pattern} , f^${-%pattern} , ${?%pattern} .
1828 echo >&3 12 = $# : ${##} , ${##1} .
1830 echo >&3 14 = $# : ${##} , ${##1} .
1832 echo >&3 16 = $# : ${##} , ${##1} .
1834 echo >&3 18 = $# : ${##} , ${##1} .
1861 echo 1=${A#$B?}.
1863 echo 2=${1#$2?}.
1875 echo "<${a#~}> <${a#\~}> <${b:-~}> <${b:-\~}> <${c:=~}><$c> <${a/~}> <${a/x/~}> <${a/x/\~}>"
1883 echo ${!?}
1891 echo 1 $! .
1892 echo 2 ${!#} .
1893 echo 3 ${!#[0-9]} .
1894 echo 4 ${!-foo} .
1900 echo >&2 "cannot test, pid '$x' not numeric"
1901 echo >&2 report this with as many details as possible
1907 t=$!; [[ $t = $x ]]; echo 5 $? .
1908 t=${!#}; [[ $t = $x ]]; echo 6 $? .
1909 t=${!#[0-9]}; [[ $t = $y ]]; echo 7 $? .
1910 t=${!-foo}; [[ $t = $x ]]; echo 8 $? .
1911 t=${!?bar}; [[ $t = $x ]]; echo 9 $? .
1927 echo "1 ${12345678901234567890} ."
1938 echo 1 ${foo//n$((n++))/[$((++i))]} .
1939 echo 2 $n , $i .
1951 echo 1 ${foo@/n$((n++))/[$((++i))]} .
1952 echo 2 $n , $i .
1962 echo 1 ${foo@/n[12]/[$KSH_MATCH]} .
1972 echo @(a[b|)c]*
1984 echo [a*(]*)z
1995 echo +()c
1996 echo +()x
1997 echo +(*)c
1998 echo +(*)x
2011 echo $x
2019 echo 1: no-file+(a|b)stuff
2020 echo 2: no-file+(a*(c)|b)stuff
2021 echo 3: no-file+((((c)))|b)stuff
2034 echo 1: a+(b|c)d
2035 echo 2: a!(@(b|B))d
2036 echo 3: *(a(b|c)) # (...|...) can be used within X(..)
2037 echo 4: a[b*(foo|bar)]d # patterns not special inside [...]
2048 case foo in !(foo|bar)) echo yes;; *) echo no;; esac
2049 case bar in !(foo|bar)) echo yes;; *) echo no;; esac
2058 case foo in *(a|b[)) echo yes;; *) echo no;; esac
2059 case foo in *(a|b[)|f*) echo yes;; *) echo no;; esac
2060 case '*(a|b[)' in *(a|b[)) echo yes;; *) echo no;; esac
2061 case 'aab[b[ab[a' in *(a|b[)) echo yes;; *) echo no;; esac
2075 echo 1: ${x#a|abc}
2076 echo 2: ${x##a|abc}
2077 echo 3: ${x%def|f}
2078 echo 4: ${x%%f|def}
2090 echo 1: ${x#*(a|b)cd}
2091 echo 2: "${x#*(a|b)cd}"
2092 echo 3: ${x#"*(a|b)cd"}
2093 echo 4: ${x#a(b|c)}
2109 echo "<${x%bar|baz},${y%bar|baz},${z%\?}>"
2110 echo "<${x%ba(r|z)},${y%ba(r|z)}>"
2112 echo "<${x%bar|baz},${y%bar|baz},${z%\?}>"
2114 echo "<${z%(*}>"
2128 echo 1: ${x/2} . ${x/}
2129 echo 2: ${x//2}
2130 echo 3: ${x/+(2)}
2131 echo 4: ${x//+(2)}
2132 echo 5: ${x/2/4}
2133 echo 6: ${x//2/4}
2134 echo 7: ${x/+(2)/4}
2135 echo 8: ${x//+(2)/4}
2136 echo 9: ${x/b/c/e/f}
2137 echo 10: ${x/b\/c/e/f}
2138 echo 11: ${x/b\/c/e\/f}
2139 echo 12: ${x/b\/c/e\\/f}
2140 echo 13: ${x/b\\/c/e\\/f}
2141 echo 14: ${x//b/c/e/f}
2142 echo 15: ${x//b\/c/e/f}
2143 echo 16: ${x//b\/c/e\/f}
2144 echo 17: ${x//b\/c/e\\/f}
2145 echo 18: ${x//b\\/c/e\\/f}
2146 echo 19: ${x/b\/*\/c/x}
2147 echo 20: ${x/\//.}
2148 echo 21: ${x//\//.}
2149 echo 22: ${x///.}
2150 echo 23: ${x/#1/9}
2151 echo 24: ${x//#1/9}
2152 echo 25: ${x/%1/9}
2153 echo 26: ${x//%1/9}
2154 echo 27: ${x//\%1/9}
2155 echo 28: ${x//\\%1/9}
2156 echo 29: ${x//\a/9}
2157 echo 30: ${x//\\a/9}
2158 echo 31: ${x/2/$y}
2197 echo 1: ${foo/#/x}
2198 echo 2: ${foo/%/x}
2199 echo 3: ${foo/#/}
2200 echo 4: ${foo/#}
2201 echo 5: ${foo/%/}
2202 echo 6: ${foo/%}
2218 echo "${wd/#$pfx/~}"
2219 echo "${wd/#\$pfx/~}"
2220 echo "${wd/#"$pfx"/~}"
2221 echo "${wd/#'$pfx'/~}"
2222 echo "${wd/#"\$pfx"/~}"
2223 echo "${wd/#'\$pfx'/~}"
2239 echo "${wd/#$(echo /home/user)/~}"
2240 echo "${wd/#"$(echo /home/user)"/~}"
2241 echo "${wd/#'$(echo /home/user)'/~}"
2254 echo 1: ${wd/#$pfx/~}
2255 echo 2: ${wd/#\$pfx/~}
2256 echo 3: ${wd/#"$pfx"/~}
2257 echo 4: ${wd/#'$pfx'/~}
2258 echo 5: ${wd/#"\$pfx"/~}
2259 echo 6: ${wd/#'\$pfx'/~}
2264 echo 7: ${ts/a\/b/$tr}
2265 echo 8: ${ts/a\/b/\$tr}
2266 echo 9: ${ts/$tp/$tr}
2267 echo 10: ${ts/\$tp/$tr}
2268 echo 11: ${ts/\\$tp/$tr}
2269 echo 12: ${ts/$tp/c/d}
2270 echo 13: ${ts/$tp/c\/d}
2271 echo 14: ${ts/$tp/c\\/d}
2272 echo 15: ${ts/+(a\/b)/$tr}
2273 echo 16: ${ts/+(a\/b)/\$tr}
2274 echo 17: ${ts/+($tp)/$tr}
2275 echo 18: ${ts/+($tp)/c/d}
2276 echo 19: ${ts/+($tp)/c\/d}
2277 echo 20: ${ts//a\/b/$tr}
2278 echo 21: ${ts//a\/b/\$tr}
2279 echo 22: ${ts//$tp/$tr}
2280 echo 23: ${ts//$tp/c/d}
2281 echo 24: ${ts//$tp/c\/d}
2282 echo 25: ${ts//+(a\/b)/$tr}
2283 echo 26: ${ts//+(a\/b)/\$tr}
2284 echo 27: ${ts//+($tp)/$tr}
2285 echo 28: ${ts//+($tp)/c/d}
2286 echo 29: ${ts//+($tp)/c\/d}
2288 echo 30: ${ts/$tp/$tr}
2289 echo 31: ${ts//$tp/$tr}
2366 echo [*
2367 echo *[x
2368 echo [x/*
2371 echo a[a-z][*
2372 echo a[a-z]*
2373 echo a[a\-z]*
2393 echo d*/*
2394 echo d*/abc
2404 (cd 'a[b'; echo ok >'c]d')
2405 echo nok >abd
2406 echo fail >a/d
2426 echo [ab-]*
2427 echo [-ab]*
2428 echo [!-ab]*
2429 echo [!ab]*
2430 echo []ab]*
2431 echo [^ab]*
2432 echo [+--]*
2433 echo [--1]*
2451 echo [a--]*
2465 echo a[�-�]*
2474 echo [a.]*
2490 echo [a-c-e]*
2491 echo [a--@]*
2500 t() { [[ $1 = *[[:\<:]]bar[[:\>:]]* ]]; echo =$?; }
2617 th\`echo not-run\`ere
2618 th\\`echo is-run`ere
2627 th`echo not-run`ere
2660 echo done
2682 echo done
2703 tr abcdefghijklmnopqrstuvwxyz nopqrstuvwxyzabcdefghijklm <<<"$(echo "foo bar")"
2704 tr abcdefghijklmnopqrstuvwxyz nopqrstuvwxyzabcdefghijklm <<<"A $(echo "foo bar") B"
2755 echo $(tr r z <<<'bar' 2>/dev/null)
2787 echo blub
2843 echo blub
2901 echo blub
3001 echo "got $(cat) on stdin"
3002 echo "got $(cat <&4) on fd#4"
3003 echo "got $(cat <&5) on fd#5"
3017 [[ $x = "$y" ]]; echo $?
3043 echo = $text =
3054 echo = $unbalanced =
3065 echo = $balanced =
3076 echo = $balanced =
3085 XXX() { echo x-en; }
3086 YYY() { echo y-es; }
3088 prefix A <<XXX && echo "$(prefix B <<XXX
3089 echo line 1
3091 echo line 2)" && prefix C <<YYY
3092 echo line 3
3094 echo line 4)"
3095 echo line 5
3099 A:echo line 3
3100 B:echo line 1
3102 C:echo line 4)"
3103 C:echo line 5
3113 echo "3<$x>"
3121 echo "7<$y>"
3135 echo end
3148 echo end
3160 echo end
3175 echo end
3188 echo end
3202 echo end
3216 echo end
3239 echo Left overs: *
3262 echo Left overs: *
3291 echo Left overs: *
3310 echo Left overs: *
3324 echo A
3328 echo B
3332 echo Left overs: *
3351 echo Left overs: *
3368 echo Left overs: *
3396 echo Left overs: *
3411 x " \" \ \\ $ \$ `echo baz` \`echo baz\` $foo \$foo x
3414 x " \" \ \\ $ \$ `echo baz` \`echo baz\` $foo \$foo x
3423 x " \" \ \\ $ \$ `echo baz` \`echo baz\` $foo \$foo x
3426 x " \" \ \ $ $ baz `echo baz` bar $foo x
3433 echo ${foo:+'blah $foo'}
3443 echo "${foo:+'blah $foo'}"
3453 echo "$( echo ${foo:+'blah $foo'})"
3462 echo ${foo%'2'*} "${foo%'2'*}" ${foo%2'*'} "${foo%2'*'}"
3484 echo ${foo:+${foo:+'blah $foo'}}
3494 echo "${foo:+${foo:+'blah $foo'}}"
3504 echo "$( echo ${foo:+${foo:+'blah $foo'}})"
3513 echo ${foo:+${foo%'2'*}} "${foo:+${foo%'2'*}}" ${foo:+${foo%2'*'}} "${foo:+${foo%2'*'}}"
3538 echo hi
3542 1 echo hi
3555 echo hi
3556 echo yo
3557 echo hi
3563 1 echo hi
3581 echo hi
3586 1 echo hi
3630 echo hi
3631 echo there
3638 /^X*echo there\nX*$/
3651 echo hi
3652 echo there
3655 /X*hi\nX*there\nX*echo there\nthere\nX*/
3671 echo ok
3686 echo abc
3687 fc -e - | (read x; echo "A $x")
3688 echo ok
3694 /^X*echo abc\nX*/
3705 echo abc def
3706 echo ghi jkl
3708 fc -e - echo
3714 2 echo ghi jkl
3716 4 echo ghi jkl
3719 /^X*echo ghi jkl\nX*$/
3731 echo line 1
3732 echo line 2
3733 echo line 3
3739 2 echo line 2
3740 3 echo line 3
3755 echo line 1
3756 echo line 2
3757 echo line 3
3763 1 echo line 1
3764 2 echo line 2
3765 3 echo line 3
3778 echo line 1
3779 echo line 2
3780 echo line 3
3781 echo line 4
3788 2 echo line 2
3789 3 echo line 3
3802 echo line 1
3803 echo line 2
3804 echo line 3
3805 echo line 4
3812 4 echo line 4
3825 echo line 1
3826 echo line 2
3827 echo line 3
3828 echo line 4
3836 4 echo line 4
3837 4 echo line 4
3852 echo line 1
3853 echo line 2
3854 echo line 3
3855 echo line 4
3856 echo line 5
3864 4 echo line 4
3865 5 echo line 5
3878 echo line 1
3879 echo line 2
3880 echo line 3
3881 echo line 4
3882 echo line 5
3890 4 echo line 4
3891 5 echo line 5
3905 echo line 1
3906 echo line 2
3907 echo line 3
3908 echo line 4
3909 echo line 5
3917 4 echo line 4
3918 3 echo line 3
3919 2 echo line 2
3932 echo line 1
3933 echo line 2
3934 echo line 3
3935 echo line 4
3936 echo line 5
3944 4 echo line 4
3945 3 echo line 3
3946 2 echo line 2
3959 echo line 1
3960 echo line 2
3961 echo line 3
3962 echo line 4
3963 echo line 5
3971 2 echo line 2
3972 3 echo line 3
3973 4 echo line 4
3986 echo abc def
3987 echo ghi jkl
3988 fc -e - abc=AB 'echo a'
3994 /^X*echo AB def\nX*$/
4005 echo abc def
4006 echo ghi jkl
4007 fc -e - jkl=XYZQRT 'echo g'
4013 /^X*echo ghi XYZQRT\nX*$/
4024 echo abc def
4025 echo ghi jkl
4032 /^X*echo ghi XYZQRT\nX*$/
4044 echo abc def asjj sadjhasdjh asdjhasd
4050 /^X*echo FooBARbc def FooBARsjj sFooBARdjhFooBARsdjh FooBARsdjhFooBARsd\nX*$/
4062 echo abc def
4063 echo ghi jkl
4070 /^X*echo AB def\nX*$/
4085 echo abc def
4086 fc echo
4096 /^X*echo FOOBAR def\nX*$/
4109 echo line 1
4110 echo line 2 is here
4111 echo line 3
4112 echo line 4
4126 /^X*echo line 2 is changed\nX*$/
4141 echo abc def
4142 fc echo
4145 echo a new line
4156 1 echo abc def
4157 2 echo FOOBAR def
4158 echo a new line
4160 /^X*echo FOOBAR def\necho a new line\nX*$/
4174 echo abc def
4175 fc echo
4196 echo line 1
4197 echo line 2 is here
4198 echo line 3
4199 echo line 4
4225 echo abc def
4226 fc echo
4229 echo a new line
4238 1 echo abc def
4239 2 echo FOOBAR def
4240 echo a new line
4248 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4264 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4281 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4298 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4318 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4329 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4341 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4352 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4355 echo -n '1:'; for i in $x ; do echo -n " [$i]" ; done ; echo
4356 echo -n '2:'; for i in :b:: ; do echo -n " [$i]" ; done ; echo
4360 echo -n '5:'; for i in $x ; do echo -n " [$i]" ; done ; echo
4363 echo -n '7:'; for i in $x ; do echo -n " [$i]" ; done ; echo
4365 echo -n '9:'; for i in ${FOO-`echo -n h:i`th:ere} ; do echo -n " [$i]" ; done ; echo
4366 showargs 10 ${FOO-`echo -n h:i`th:ere}
4367 showargs 11 "${FOO-`echo -n h:i`th:ere}"
4369 echo -n '12:'; for i in $x ; do echo -n " [$i]" ; done ; echo
4390 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4401 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4416 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4448 [ "$q" = "$nq" ] && echo =true || echo =false
4472 [ "$q" = "$nq" ] && echo =true || echo =false
4726 echo '=a1zns'
4729 echo '=a2zqs'
4732 echo '=a3zna'
4735 echo '=a4zqa'
4738 echo '=a5ins'
4741 echo '=a6iqs'
4744 echo '=a7ina'
4747 echo '=a8iqa'
4750 echo '=b1zns'
4753 echo '=b2zqs'
4756 echo '=b3zna'
4759 echo '=b4zqa'
4762 echo '=b5ins'
4765 echo '=b6iqs'
4768 echo '=b7ina'
4771 echo '=b8iqa'
4850 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4862 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4874 n() { echo "$#"; }; n "${foo-$@}"
4882 "$__progname" -c 'IFS=; set a b; [[ $* = "$1$2" ]]; echo 1 $?' sh a b
4883 "$__progname" -c 'IFS=; [[ $* = ab ]]; echo 2 "$?"' sh a b
4884 "$__progname" -c 'IFS=; [[ "$*" = ab ]]; echo 3 "$?"' sh a b
4885 "$__progname" -c 'IFS=; [[ $* = a ]]; echo 4 "$?"' sh a b
4886 "$__progname" -c 'IFS=; [[ "$*" = a ]]; echo 5 "$?"' sh a b
4887 "$__progname" -c 'IFS=; [[ "$@" = a ]]; echo 6 "$?"' sh a b
4888 "$__progname" -c 'IFS=; case "$@" in a) echo 7 a;; ab) echo 7 b;; a\ b) echo 7 ok;; esac' sh a b
4889 "$__progname" -c 'IFS=; case $* in a) echo 8 a;; ab) echo 8 ok;; esac' sh a b
4906 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4913 echo "var=$var"
4925 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4939 echo $i
4952 echo $i
4967 echo $a
4970 echo $a
4995 echo $i
5004 echo $i
5005 echo ---------- A
5007 echo $j
5008 echo ---------- B
5011 echo $k
5012 echo ---------- C
5015 echo $l
5016 echo ---------- D
5019 echo $m
5020 echo ---------- E
5023 echo $n
5025 echo $n
5026 echo ---------- F
5029 echo $o
5030 echo ---------- G
5033 echo $p
5058 echo $aa
5061 echo $bb
5064 echo $bb
5067 echo $cc
5085 echo $a
5094 echo $a
5095 echo --
5098 echo $j
5099 echo --
5102 echo $k
5103 echo --
5105 for l in 1 2+3 4; do echo $l; done
5124 echo $i
5132 echo $(( zz = 8#100 ))
5133 echo $zz
5142 echo 1:$((36#109AZ)).
5144 echo 2:$x.
5146 echo 3:$x.
5158 echo 1 "$("$__progname" -c 'echo :$((10))/$((010)),$((0x10)):')" .
5159 echo 2 "$("$__progname" -o posix -c 'echo :$((10))/$((010)),$((0x10)):')" .
5160 echo 3 "$("$__progname" -o sh -c 'echo :$((10))/$((010)),$((0x10)):')" .
5171 echo 1:$((1#1))0.
5180 echo 1:$((1#1))0.
5190 eval 'echo '$i':$(('$i'#10)).'
5192 echo 37:$($__progname -c 'echo $((37#10))').$?:
5309 echo s:$((2147483647+1)).$(((2147483647*2)+1)).$(((2147483647*2)+2)).
5310 echo u:$((#2147483647+1)).$((#(2147483647*2)+1)).$((#(2147483647*2)+2)).
5320 echo s:$((9223372036854775807+1)).$(((9223372036854775807*2)+1)).$(((9223372036854775807*2)+2)).
5321 echo u:$((#9223372036854775807+1)).$((#(9223372036854775807*2)+1)).$((#(9223372036854775807*2)+2)).
5337 echo A $LINENO
5338 echo B $LINENO
5340 echo C $LINENO
5350 echo dot A $LINENO
5351 echo dot B $LINENO
5353 echo dot C $LINENO
5355 echo A $LINENO
5356 echo B $LINENO
5369 echo A $LINENO
5370 echo B $LINENO
5372 echo func A $LINENO
5373 echo func B $LINENO
5376 echo C $LINENO
5388 echo dot A $LINENO
5389 echo dot B $LINENO
5392 echo A $LINENO
5393 echo B $LINENO
5395 echo func A $LINENO
5396 echo func B $LINENO
5400 echo C $LINENO
5415 echo dot A $LINENO
5416 echo dot B $LINENO
5420 echo A $LINENO
5421 echo B $LINENO
5423 echo func A $LINENO
5424 echo func B $LINENO
5428 echo C $LINENO
5443 echo "line <$1>"
5456 ${ZSH_VERSION+false} || emulate sh; echo $LINENO
5457 echo $LINENO
5458 eval ' echo $LINENO
5459 echo $LINENO
5460 echo $LINENO'
5461 echo $LINENO
5475 trap "echo trap 1 executed" UNKNOWNSIGNAL || echo "foo"
5476 echo =1
5477 trap "echo trap 2 executed" UNKNOWNSIGNAL EXIT 999999 FNORD
5478 echo = $?
5494 echo "A B " > IN
5497 echo 1: "x[$x] y[$y] z[$z]"
5498 echo 1a: ${z-z not set}
5500 echo 2: "x[$x]"
5570 echo "abc" > IN
5572 echo "[$REPLY]";
5588 echo "<$a|$b|$c><$d>"
5648 echo foo[
5650 echo "hi[ $n ]=1"
5659 $ echo echo hi > /tmp/q ; chmod a+rx /tmp/q
5674 # Need to restore path so echo can be found (some shells don't have
5677 echo hi
5692 $ ksh -c 'echo $(echo \( )'
5694 $ ksh -c 'echo $(echo "(" )'
5703 echo $(echo \( )
5704 echo $(echo "(" )
5716 echo $i
5724 echo 'continue in for loop broken'
5731 echo bye
5739 echo $?
5749 echo -n "FPOSIX=$FPOSIX FSH=$FSH "
5754 echo rv=$?
5758 echo rv=$?
5762 echo rv=$?
5766 echo rv=$?
5777 echo $?
5786 echo -n "FPOSIX=$FPOSIX FSH=$FSH "
5791 echo rv=$?
5795 echo rv=$?
5799 echo rv=$?
5803 echo rv=$?
5814 echo ${x##*/}
5815 should echo blah but on some machines echos /foo/bar/blah.
5818 echo ${x##*/}
5827 echo "`echo \"$x\"`"
5828 echo "`echo "$x"`"
5832 echo "`echo \"$x\"`"
5833 echo "`echo "$x"`"
5851 echo A line of text that will be duplicated quite a number of times.> t1
5884 echo 1: $?
5885 echo 2: $(whence does/not/exist | wc -l)
5886 echo 3: $(whence does/not/exist cat | wc -l)
5897 $ echo $line
5899 $ echo ${line%%:*}
5901 $ echo $line
5904 change the value of line. On sun4s & pas, the echo ${line%%:*} doesn't
5909 echo ${x%%:*}
5910 echo $x
5932 $ echo ${x%/*}
5934 $ echo "${x%/*}"
5938 echo "${x%/*}"
5947 -\?) echo hi
5952 -\\?) echo hi
5958 -\?) echo fail
5964 $ echo `echo hi \`echo there\` folks`
5965 asks for more info. sh and AT&T ksh88 both echo
5968 echo `echo hi \`echo there\` folks`
5975 $ (echo hi ; (echo there ; echo folks))
5979 $ (echo hi ; (echo there ; echo folks))
5985 ( : ; ( : ; echo hi))
5995 (echo a; echo b) | while read x ; do
5996 echo $x
6014 echo $last
6028 echo hi
6036 a.x=1 echo hi
6045 a b hi ; do echo $i ; done
6053 echo ${a{b}}
6067 echo "[$x]"
6068 echo $ret
6086 echo 1: ${x-x not set} ${y-y not set} ${z-z not set}
6087 echo 2: ${x:+x not null} ${y:+y not null} ${z:+z not null}
6136 (echo abcdef; echo; echo 123) |
6140 c=`echo $line | wc -c`
6141 echo $c
6161 if false; then echo hi ; fi
6164 while false; do echo hi; done
6165 echo ok
6176 echo `false; echo hi` $(<this-file-does-not-exist)
6177 echo $?
6188 echo hi
6197 echo bar`
6198 echo "($foo)"
6231 echo "<$FOO>"
6232 echo "<$BAR>"
6233 echo "<$MORE>"
6234 echo "<$JUNK>"
6246 alias x='echo hi'
6248 echo "[$FOO]"
6258 alias x='echo hi;
6259 echo there'
6261 echo done
6279 echo "done ($?)"
6281 echo=echo; [ -x /bin/echo ] && echo=/bin/echo
6282 exec $echo subtest-1 hi
6284 echo subtest-1 foo/*
6286 echo=echo; [ -x /bin/echo ] && echo=/bin/echo
6287 sed 's/^/X /' << E_O_F; exec $echo subtest-2 hi
6293 echo subtest-2 foo/*
6309 echo X$FOO
6331 alias foo='echo hi ; '
6333 foo echo there
6347 echo A: $*, *
6363 echo mark 1
6365 echo mark 2
6379 echo bfunc: enter "(args: $*; OPTIND=$OPTIND)"
6383 echo bfunc: B option
6386 echo bfunc: odd option "($oc)"
6390 echo bfunc: leave
6394 echo kfunc: enter "(args: $*; OPTIND=$OPTIND)"
6398 echo kfunc: K option
6401 echo bfunc: odd option "($oc)"
6405 echo kfunc: leave
6409 echo "line 1: OPTIND=$OPTIND"
6411 echo "line 2: ret=$?, optc=$optc, OPTIND=$OPTIND"
6413 echo "line 3: OPTIND=$OPTIND"
6415 echo "line 4: ret=$?, optc=$optc, OPTIND=$OPTIND"
6417 echo "line 5: OPTIND=$OPTIND"
6419 echo "line 6: ret=$?, optc=$optc, OPTIND=$OPTIND"
6420 echo
6424 echo "line 10: OPTIND=$OPTIND"
6426 echo "line 20: ret=$?, optc=$optc, OPTIND=$OPTIND"
6428 echo "line 30: OPTIND=$OPTIND"
6430 echo "line 40: ret=$?, optc=$optc, OPTIND=$OPTIND"
6432 echo "line 50: OPTIND=$OPTIND"
6434 echo "line 60: ret=$?, optc=$optc, OPTIND=$OPTIND"
6473 echo ok dparen
6476 echo ok dbrackets
6487 echo 1 ${x%X*}
6488 echo 2 ${x:%X*}
6489 echo 3 ${x%%X*}
6490 echo 4 ${x:%%X*}
6491 echo 5 ${x#*X}
6492 echo 6 ${x:#*X}
6493 echo 7 ${x##*X}
6494 echo 8 ${x:##*X}
6511 echo A
6513 echo B
6517 echo M
6519 echo N
6536 trap 'echo hi' exit
6547 echo ${#a[*]}
6556 echo A $?
6558 echo B $?
6560 echo C $?
6570 trap 'echo parent exit' EXIT
6571 echo start
6572 (echo A; echo A last)
6573 echo B
6574 (echo C; trap 'echo sub exit' EXIT; echo C last)
6575 echo parent last
6592 test a -nt b && echo nt OK || echo nt BAD
6593 test b -ot a && echo ot OK || echo ot BAD
6603 echo FNORD-0
6615 echo FNORD-1
6617 echo FNORD-2
6619 echo FNORD-3
6621 echo FNORD-4
6623 echo FNORD-5
6625 echo FNORD-6
6627 echo FNORD-7
6629 echo FNORD-8
6633 echo FNORD-9
6708 echo blub |&
6710 echo ok
6748 echo 1 $(( a = 5 )) .
6749 echo 2 $(( ++a )) , $(( a++ )) , $(( a )) .
6750 echo 3 $(( --a )) , $(( a-- )) , $(( a )) .
6751 echo 4 $(( a == 5 )) , $(( a == 6 )) .
6752 echo 5 $(( a != 5 )) , $(( a != 6 )) .
6753 echo 6 $(( a *= 3 )) .
6754 echo 7 $(( a /= 5 )) .
6755 echo 8 $(( a %= 2 )) .
6756 echo 9 $(( a += 9 )) .
6757 echo 10 $(( a -= 4 )) .
6758 echo 11 $(( a <<= 1 )) .
6759 echo 12 $(( a >>= 1 )) .
6760 echo 13 $(( a &= 4 )) .
6761 echo 14 $(( a ^= a )) .
6762 echo 15 $(( a |= 5 )) .
6763 echo 16 $(( 5 << 1 )) .
6764 echo 17 $(( 5 >> 1 )) .
6765 echo 18 $(( 5 <= 6 )) , $(( 5 <= 5 )) , $(( 5 <= 4 )) .
6766 echo 19 $(( 5 >= 6 )) , $(( 5 >= 5 )) , $(( 5 >= 4 )) .
6767 echo 20 $(( 5 < 6 )) , $(( 5 < 5 )) , $(( 5 < 4 )) .
6768 echo 21 $(( 5 > 6 )) , $(( 5 > 5 )) , $(( 5 > 4 )) .
6769 echo 22 $(( 0 && 0 )) , $(( 0 && 1 )) , $(( 1 && 0 )) , $(( 1 && 1 )) .
6770 echo 23 $(( 0 || 0 )) , $(( 0 || 1 )) , $(( 1 || 0 )) , $(( 1 || 1 )) .
6771 echo 24 $(( 5 * 3 )) .
6772 echo 25 $(( 7 / 2 )) .
6773 echo 26 $(( 5 % 5 )) , $(( 5 % 4 )) , $(( 5 % 1 )) , $(( 5 % -1 )) , $(( 5 % -2 )) .
6774 echo 27 $(( 5 + 2 )) , $(( 5 + 0 )) , $(( 5 + -2 )) .
6775 echo 28 $(( 5 - 2 )) , $(( 5 - 0 )) , $(( 5 - -2 )) .
6776 echo 29 $(( 6 & 4 )) , $(( 6 & 8 )) .
6777 echo 30 $(( 4 ^ 2 )) , $(( 4 ^ 4 )) .
6778 echo 31 $(( 4 | 2 )) , $(( 4 | 4 )) , $(( 4 | 0 )) .
6779 echo 32 $(( 0 ? 1 : 2 )) , $(( 3 ? 4 : 5 )) .
6780 echo 33 $(( 5 , 2 , 3 )) .
6781 echo 34 $(( ~0 )) , $(( ~1 )) , $(( ~~1 )) , $(( ~~2 )) .
6782 echo 35 $(( !0 )) , $(( !1 )) , $(( !!1 )) , $(( !!2 )) .
6783 echo 36 $(( (5) )) .
6828 echo 1 $(( a ^<= 1 )) , $(( b ^<= 1 )) .
6829 echo 2 $(( a ^>= 2 )) , $(( b ^>= 2 )) .
6830 echo 3 $(( 5 ^< 1 )) .
6831 echo 4 $(( 5 ^> 1 )) .
6842 "$__progname" -c 'u=x; echo $? $u .' || echo aborted, $?
6843 echo =
6844 "$__progname" -c 'readonly u; u=x; echo $? $u .' || echo aborted, $?
6845 echo =
6846 "$__progname" -c 'u=x; readonly u; unset u; echo $? $u .' || echo aborted, $?
6860 "$__progname" -c 'readonly foo; export foo=a; echo $?' || echo aborted, $?
6870 …"$__progname" -c 'set -- -a b; getopts a c; echo $? $c .; getopts a c; echo $? $c .' || echo abort…
6879 "$__progname" -c 'readonly c; set -- -a b; getopts a c; echo $? $c .' || echo aborted, $?
6889 echo x | "$__progname" -c 'read s; echo $? $s .' || echo aborted, $?
6890 echo y | "$__progname" -c 'readonly s; read s; echo $? $s .' || echo aborted, $?
6930 echo ${ab\
6964 echo $BAR
6974 X=a Y=b; X=$Y Y=$X "$__progname" -c 'echo 1 $X $Y .'; echo 2 $X $Y .
6976 X=a Y=${X=b} Z=$X "$__progname" -c 'echo 3 $Z .'
6978 X=a Y=${X=b} Z=$X; echo 4 $Z .
6991 X=a Y=b; X=$Y Y=$X; echo 1 $X $Y .
7003 Z=a Y=${X:=b} sh -c 'echo +$X+ +$Y+ +$Z+'
7004 echo /$X/
7007 X= Y=${X:=b} sh -c 'echo +$X+ +$Y+'
7008 echo /$X/
7043 f() { a=2; }; g() { b=3; echo y$c-; }; a=1 f; b=2; c=1 g
7044 echo x$a-$b- z$c-
7093 echo "${foo:-"a"}*"
7100 echo ${foo#a c}
7108 echo ${x#$*}
7114 echo ${:}
7122 echo ${*:0}
7130 echo ${foo[*]:0}
7140 echo "<$*> X${*:+ }X"
7176 echo ${A[x=(i+=1)]#${A[y=(i+=2)]}}
7177 echo $x $y
7187 echo ${foo[*]}
7189 echo ${foo[*]}
7199 exec echo hi
7200 echo still herre
7218 echo loop1=$?
7228 echo loop2=$?
7235 echo loop3=$?
7248 echo $?
7251 echo $?
7264 echo blank: $?
7267 (echo subshell: $?)
7269 echo 'echo include: $?' > foo
7273 trap 'echo trap: $?' ERR
7275 echo exit: $?
7287 echo `echo [�`
7299 echo x${foo?$x}
7310 echo RETVAL: $rv
7314 doit 'echo ${1x}'
7315 doit 'echo "${1x}"'
7316 doit 'echo ${1?}'
7317 doit 'echo ${19?}'
7318 doit 'echo ${!:?}'
7319 doit -u 'echo ${*:?}' foo ""
7339 arguments: !-c!echo "[$-]"!
7347 echo ${A=a=}~ b=~ c=d~ ~
7350 echo ". $e . $f ."
7351 echo ". $g . $h ."
7354 echo ${A=a=}~ b=~ c=d~ ~
7357 echo ". $e . $f ."
7358 echo ". $g . $h ."
7376 echo "<$c>" "<$d>"
7382 [[ $plus = / ]]; echo one $? .
7383 [[ $minus = "$wd" ]]; echo two $? .
7384 [[ $nix = /sweet ]]; echo nix $? .
7395 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
7431 command echo 10 ksh a=~
7436 command echo 12 posix a=~
7443 echo 'echo "<$foo>"' >bar
7460 echo "20 some arbitrary stuff "=~
7462 echo "21 some arbitrary stuff "=~
7495 env false && echo something
7496 echo END
7501 + echo END
7514 env false && echo something
7516 echo END
7522 + echo END
7530 trap 'echo EXIT' EXIT
7531 trap 'echo ERR' ERR
7534 echo DONE
7546 echo pre
7548 false && echo foo
7550 echo bar
7568 echo $x
7570 echo pre
7572 echo post
7584 print 'all:\n\t@echo eins\n\t@exit 42\n' >zd/a/Makefile
7585 print 'all:\n\t@echo zwei\n' >zd/b/Makefile
7588 …en echo "($_nextdir_ skipped)"; break; fi; subskipdir="$subskipdir ${subentry#/}"; fi; done;…
7604 echo x
7606 echo y$?
7629 echo 1 ok
7631 echo 2 wrong
7641 (echo; echo :) >x
7642 "$__progname" ./x >/dev/null 2>&1; r=$?; echo $((i++)) $r .
7643 "$__progname" -c ./x >/dev/null 2>&1; r=$?; echo $((i++)) $r .
7644 echo exit 42 >x
7645 "$__progname" ./x >/dev/null 2>&1; r=$?; echo $((i++)) $r .
7646 "$__progname" -c ./x >/dev/null 2>&1; r=$?; echo $((i++)) $r .
7648 "$__progname" ./x >/dev/null 2>&1; r=$?; echo $((i++)) $r .
7649 "$__progname" -c ./x >/dev/null 2>&1; r=$?; echo $((i++)) $r .
7664 echo A $?
7667 echo B $?
7670 echo C $?
7673 echo D $?
7676 echo E $?
7679 eval $(echo :; false)
7680 echo F $?
7681 echo -n "G "
7683 eval 'echo $?'
7684 echo H $?
7699 trap 'echo hi; exit' EXIT
7714 trap 'echo EXtrap' EXIT
7715 trap 'echo ERtrap' ERR
7717 echo "and run $2"
7719 echo and out
7722 trap 'echo EXtrap' EXIT
7723 trap 'echo ERtrap' ERR
7725 echo 'and run true'
7727 echo and out
7730 trap 'echo EXtrap' EXIT
7731 trap 'echo ERtrap' ERR
7733 echo 'and run false'
7735 echo and out
7738 trap 'echo EXtrap' EXIT
7739 trap 'echo ERtrap' ERR
7741 echo 'and run ${v?}'
7743 echo and out
7749 echo $? >rc
7756 echo : $xe
7758 echo = eval-true $(<rc) .
7760 echo = eval-false $(<rc) .
7762 echo = eval-undef $(<rc) .
7764 echo = noeval-true $(<rc) .
7766 echo = noeval-false $(<rc) .
7768 echo = noeval-undef $(<rc) .
7770 echo : $xe
7772 echo = eval-true $(<rc) .
7774 echo = eval-false $(<rc) .
7776 echo = eval-undef $(<rc) .
7778 echo = noeval-true $(<rc) .
7780 echo = noeval-false $(<rc) .
7782 echo = noeval-undef $(<rc) .
7845 echo Syntax error <
7846 echo 'After error 1'
7847 trap 'echo Exit trap' EXIT
7848 echo Syntax error <
7849 echo 'After error 2'
7850 trap 'echo Exit trap' EXIT
7852 echo 'After exit'
7864 test 2005/10/08 '<' 2005/08/21 && echo ja || echo nein
7865 test 2005/08/21 \< 2005/10/08 && echo ja || echo nein
7866 test 2005/10/08 '>' 2005/08/21 && echo ja || echo nein
7867 test 2005/08/21 \> 2005/10/08 && echo ja || echo nein
7877 Check a weird precedence case (and POSIX echo)
7881 echo $rv
7890 test -o $1; echo $?
7891 [ -o $1 ]; echo $?
7892 [[ -o $1 ]]; echo $?
7895 test -o $1 -o -o !$1; echo $?
7896 [ -o $1 -o -o !$1 ]; echo $?
7897 [[ -o $1 || -o !$1 ]]; echo $?
7898 test -o ?$1; echo $?
7900 echo 0y $(if_test utf8-mode) =
7901 echo 0n $(if_test utf8-hack) =
7902 echo 1= $(runtest utf8-hack) =
7903 echo 2= $(runtest !utf8-hack) =
7904 echo 3= $(runtest ?utf8-hack) =
7906 echo 1+ $(runtest utf8-mode) =
7907 echo 2+ $(runtest !utf8-mode) =
7908 echo 3+ $(runtest ?utf8-mode) =
7910 echo 1- $(runtest utf8-mode) =
7911 echo 2- $(runtest !utf8-mode) =
7912 echo 3- $(runtest ?utf8-mode) =
7913 echo = short flags =
7914 echo 0y $(if_test -U) =
7915 echo 0y $(if_test +U) =
7916 echo 0n $(if_test -_) =
7917 echo 0n $(if_test -U-) =
7918 echo 1= $(runtest -_) =
7919 echo 2= $(runtest !-_) =
7920 echo 3= $(runtest ?-_) =
7922 echo 1+ $(runtest -U) =
7923 echo 2+ $(runtest !-U) =
7924 echo 3+ $(runtest ?-U) =
7925 echo 1+ $(runtest +U) =
7926 echo 2+ $(runtest !+U) =
7927 echo 3+ $(runtest ?+U) =
7929 echo 1- $(runtest -U) =
7930 echo 2- $(runtest !-U) =
7931 echo 3- $(runtest ?-U) =
7932 echo 1- $(runtest +U) =
7933 echo 2- $(runtest !+U) =
7934 echo 3- $(runtest ?+U) =
7973 rv=$?; echo $((++i)) $rv
7976 rv=$?; echo $((++i)) $rv
7979 rv=$?; echo $((++i)) $rv
7982 rv=$?; echo $((++i)) $rv
7985 rv=$?; echo $((++i)) $rv
7988 rv=$?; echo $((++i)) $rv
7991 rv=$?; echo $((++i)) $rv
7993 rv=$?; echo $((++i)) $rv
7995 rv=$?; echo $((++i)) $rv
7997 rv=$?; echo $((++i)) $rv
8015 echo ok
8026 rv=$?; echo $((++i)) $rv
8028 rv=$?; echo $((++i)) $rv
8030 rv=$?; echo $((++i)) $rv
8032 rv=$?; echo $((++i)) $rv
8035 rv=$?; echo $((++i)) $rv
8037 rv=$?; echo $((++i)) $rv
8039 rv=$?; echo $((++i)) $rv
8041 rv=$?; echo $((++i)) $rv
8044 rv=$?; echo $((++i)) $rv
8046 rv=$?; echo $((++i)) $rv
8048 rv=$?; echo $((++i)) $rv
8050 rv=$?; echo $((++i)) $rv
8071 rv=$?; echo $((++i)) $rv
8073 rv=$?; echo $((++i)) $rv
8075 rv=$?; echo $((++i)) $rv
8077 rv=$?; echo $((++i)) $rv
8080 rv=$?; echo $((++i)) $rv
8082 rv=$?; echo $((++i)) $rv
8084 rv=$?; echo $((++i)) $rv
8086 rv=$?; echo $((++i)) $rv
8089 rv=$?; echo $((++i)) $rv
8091 rv=$?; echo $((++i)) $rv
8093 rv=$?; echo $((++i)) $rv
8095 rv=$?; echo $((++i)) $rv
8117 (0) echo yepp 0 \#"$*" ;;
8118 (1) echo nope 1 \#"$*" ;;
8119 (2) echo terr 2 \#"$*" ;;
8120 (*) echo wtf\? $? \#"$*" ;;
8150 echo x $FNORD
8162 echo x $FNORD
8176 echo x $FNORD
8190 echo x $FNORD
8201 [[ $(set +o) == *@(-o sh)@(| *) ]] && echo sh || echo nosh
8202 [[ $(set +o) == *@(-o braceexpand)@(| *) ]] && echo brex || echo nobrex
8203 echo {a,b,c}
8205 echo {a,b,c}
8207 echo {a,b,c}
8209 echo {a,b,c}
8210 [[ $(set +o) == *@(-o sh)@(| *) ]] && echo sh || echo nosh
8211 [[ $(set +o) == *@(-o braceexpand)@(| *) ]] && echo brex || echo nobrex
8213 echo {a,b,c}
8214 [[ $(set +o) == *@(-o sh)@(| *) ]] && echo sh || echo nosh
8215 [[ $(set +o) == *@(-o braceexpand)@(| *) ]] && echo brex || echo nobrex
8240 '[[ $(set +o) == *"-o "@(sh|posix)@(| *) ]] && echo sh || echo nosh')
8259 '[[ $(set +o) == *"-o "@(sh|posix)@(| *) ]] && echo sh || echo nosh')
8274 echo *
8275 echo a | while read d; do
8276 echo $d
8277 echo $d*
8278 echo *
8280 echo $d*
8281 echo *
8283 echo *
8298 "$__progname" -c 'i=100; echo hi |& while read -p line; do echo "$((i++)) $line"; done'
8299 "$__progname" -c 'i=200; echo hi | cat |& while read -p line; do echo "$((i++)) $line"; done'
8300 "$__progname" -c 'i=300; (echo hi | cat) |& while read -p line; do echo "$((i++)) $line"; done'
8310 echo 1 $PIPESTATUS .
8311 echo 2 ${PIPESTATUS[0]} .
8312 echo 3 ${PIPESTATUS[1]} .
8313 (echo x; exit 12) | (cat; exit 23) | (cat; exit 42)
8314 …echo 5 $? , $PIPESTATUS , ${PIPESTATUS[0]} , ${PIPESTATUS[1]} , ${PIPESTATUS[2]} , ${PIPESTATUS[3]…
8315 echo 6 ${PIPESTATUS[0]} .
8317 echo 8 $(set | fgrep PIPESTATUS) .
8332 echo 1 "$("$__progname" -c '(exit 12) | (exit 23) | (exit 42); echo $?')" .
8333 echo 2 "$("$__progname" -c '! (exit 12) | (exit 23) | (exit 42); echo $?')" .
8334 echo 3 "$("$__progname" -o pipefail -c '(exit 12) | (exit 23) | (exit 42); echo $?')" .
8335 echo 4 "$("$__progname" -o pipefail -c '! (exit 12) | (exit 23) | (exit 42); echo $?')" .
8336 echo 5 "$("$__progname" -c '(exit 23) | (exit 42) | :; echo $?')" .
8337 echo 6 "$("$__progname" -c '! (exit 23) | (exit 42) | :; echo $?')" .
8338 echo 7 "$("$__progname" -o pipefail -c '(exit 23) | (exit 42) | :; echo $?')" .
8339 echo 8 "$("$__progname" -o pipefail -c '! (exit 23) | (exit 42) | :; echo $?')" .
8340 echo 9 "$("$__progname" -o pipefail -c 'x=$( (exit 23) | (exit 42) | :); echo $?')" .
8376 echo before ${arrfoo[0]} .
8378 echo after ${arrfoo[0]} .
8381 echo inside before ${arrbar[0]} .
8383 echo inside changed ${arrbar[0]} .
8385 echo inside typeset ${arrbar[0]} .
8387 echo inside changed ${arrbar[0]} .
8389 echo before ${arrbar[0]} .
8391 echo after ${arrbar[0]} .
8407 echo =
8409 echo =
8429 echo "<$ln> <$rn> <$lz> <$rz> <$rx>"
8443 echo "<$ln> <$rn> <$zn> <$ls> <$rs> <$zs>"
8461 echo got ${#anzahl[*]} files
8465 echo =
8467 echo =
8469 echo =
8471 echo =
8473 echo =
8474 "$__progname" -c 'echo : $(fnord)'
8536 echo is set
8538 echo is not set
8554 echo is set
8556 echo is not set
8569 code='if [[ $- = *U* ]]; then echo $i on; else echo $i off; fi'
8572 echo $((++i)) done
8584 code='if [[ $- = *U* ]]; then echo $i on; else echo $i off; fi'
8587 echo $((++i)) done
8680 "$__progname" -c $'alias a="echo OK"\na'
8688 alias foo='echo makro'
8690 echo funktion
8700 alias foo='echo makro'
8702 echo funktion
8712 alias foo='echo makro'
8714 echo funktion
8737 echo "${#foo[*]}|${foo[0]}|${foo[1]}|${foo[2]}|${foo[3]}|${foo[4]}|"
8747 echo "${#foo[*]}|${foo[0]}|${foo[1]}|${foo[2]}|${foo[3]}|${foo[4]}|"
8763 …#foo[*]}" "${foo[0]}" "${foo[1]}" "${foo[2]}" "${foo[3]}" "${foo[4]}" "${foo[5]}" "${foo[6]}"; echo
8768 …#foo[*]}" "${foo[0]}" "${foo[1]}" "${foo[2]}" "${foo[3]}" "${foo[4]}" "${foo[5]}" "${foo[6]}"; echo
8773 …#foo[*]}" "${foo[0]}" "${foo[1]}" "${foo[2]}" "${foo[3]}" "${foo[4]}" "${foo[5]}" "${foo[6]}"; echo
8786 echo ${foo[*]}
8788 echo ${foo[4294967295]} g ${foo[*]}
8799 echo "${#foo[*]}|${foo[0]}|${foo[1]}|${foo[2]}|${foo[3]}|${foo[4]}|${foo[5]}|"
8803 echo "<${arr[0]}><${arr[5]}>"
8816 echo "${#foo[*]}|${foo[0]}|${foo[1]}|${foo[2]}|${foo[3]}|${foo[4]}|${foo[5]}|"
8818 echo k= ${!x[*]} .
8819 echo v= ${x[*]} .
8825 echo "<${arr[0]}><${arr[5]}>"
8840 echo -n "$((i++))<$x>"
8842 echo
8846 echo =
8850 echo =
8851 echo a $(of ${foo[*]}) = $(of ${bar[*]}) a
8852 echo b $(of "${foo[*]}") = $(of "${bar[*]}") b
8853 echo c $(of ${foo[@]}) = $(of ${bar[@]}) c
8854 echo d $(of "${foo[@]}") = $(of "${bar[@]}") d
8855 echo e $(of ${!foo[*]}) = $(of ${!bar[*]}) e
8856 echo f $(of "${!foo[*]}") = $(of "${!bar[*]}") f
8857 echo g $(of ${!foo[@]}) = $(of ${!bar[@]}) g
8858 echo h $(of "${!foo[@]}") = $(of "${!bar[@]}") h
8880 echo !arz: ${!arz}
8881 echo !arz[0]: ${!arz[0]}
8882 echo !arz[1]: ${!arz[1]}
8884 echo !arz: ${!arz}
8885 echo !arz[0]: ${!arz[0]}
8886 echo !arz[1]: ${!arz[1]}
8888 echo !arz: ${!arz}
8889 echo !arz[0]: ${!arz[0]}
8890 echo !arz[1]: ${!arz[1]}
8989 unset foo; foo=(bar); foo+=(baz); echo 1 ${!foo[*]} : ${foo[*]} .
8990 unset foo; foo=(foo bar); foo+=(baz); echo 2 ${!foo[*]} : ${foo[*]} .
8991 # unset foo; foo=([2]=foo [0]=bar); foo+=(baz [5]=quux); echo 3 ${!foo[*]} : ${foo[*]} .
9001 unset foo; foo=bar; foo+=baz; echo 1 $foo .
9002 unset foo; typeset -i16 foo=10; foo+=20; echo 2 $foo .
9011 a=($(echo a b))
9012 b=($(echo "a b"))
9013 c=("$(echo "a b")")
9014 d=("$(echo a b)")
9015 a+=($(echo c d))
9016 b+=($(echo "c d"))
9017 c+=("$(echo "c d")")
9018 d+=("$(echo c d)")
9019 echo ".a:${a[0]}.${a[1]}.${a[2]}.${a[3]}:"
9020 echo ".b:${b[0]}.${b[1]}.${b[2]}.${b[3]}:"
9021 echo ".c:${c[0]}.${c[1]}.${c[2]}.${c[3]}:"
9022 echo ".d:${d[0]}.${d[1]}.${d[2]}.${d[3]}:"
9044 echo ".fn:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9053 echo ".rfn:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9057 echo ".f0:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9059 echo ".f1:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9061 echo ".f2:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9062 echo ".rf0:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9064 echo ".rf1:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9066 echo ".rf2:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9088 echo ".fn:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9098 echo ".rfn:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9108 echo ".fnr:${z[0]}.${z[1]}.${z[2]}.${z[3]}:"
9113 echo ".f0:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9115 echo ".f1:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9117 echo ".f2:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9118 echo ".rf0:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9120 echo ".rf1:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9122 echo ".rf2:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9123 echo ".f0r:${z[0]}.${z[1]}.${z[2]}.${z[3]}:"
9125 echo ".f1r:${z[0]}.${z[1]}.${z[2]}.${z[3]}:"
9127 echo ".f2r:${z[0]}.${z[1]}.${z[2]}.${z[3]}:"
9153 echo ".fn:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9159 echo ".rfn:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9165 echo ".fnr:${z[0]}.${z[1]}.${z[2]}.${z[3]}:"
9170 echo ".f0:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9172 echo ".f1:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9174 echo ".f2:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9175 echo ".rf0:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9177 echo ".rf1:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9179 echo ".rf2:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9180 echo ".f0r:${z[0]}.${z[1]}.${z[2]}.${z[3]}:"
9182 echo ".f1r:${z[0]}.${z[1]}.${z[2]}.${z[3]}:"
9184 echo ".f2r:${z[0]}.${z[1]}.${z[2]}.${z[3]}:"
9208 echo ".fn:$x:"
9213 echo ".rfn:$y:"
9217 echo ".f0:$x:"
9219 echo ".f1:$x:"
9221 echo ".f2:$x:"
9222 echo ".rf0:$y:"
9224 echo ".rf1:$y:"
9226 echo ".rf2:$y:"
9248 echo ".fn:$x:"
9254 echo ".rfn:$y:"
9260 echo ".fnr:$z:"
9265 echo ".f0:$x:"
9267 echo ".f1:$x:"
9269 echo ".f2:$x:"
9270 echo ".rf0:$y:"
9272 echo ".rf1:$y:"
9274 echo ".rf2:$y:"
9275 echo ".f0r:$z:"
9277 echo ".f1r:$z:"
9279 echo ".f2r:$z:"
9305 echo ".fn:$x:"
9311 echo ".rfn:$y:"
9317 echo ".fnr:$z:"
9322 echo ".f0:$x:"
9324 echo ".f1:$x:"
9326 echo ".f2:$x:"
9327 echo ".rf0:$y:"
9329 echo ".rf1:$y:"
9331 echo ".rf2:$y:"
9332 echo ".f0r:$z:"
9334 echo ".f1r:$z:"
9336 echo ".f2r:$z:"
9361 echo f0: $x
9363 echo f1: $x
9365 echo f2: $x
9367 echo f3: $x
9369 echo f4: $x
9372 echo before: $x
9374 echo after: $x
9391 echo f0: $x
9393 echo f1: $x
9395 echo f2: $x
9397 echo f3: $x
9399 echo f4: $x
9402 echo before: $x
9404 echo after: $x
9422 echo a t${x:2:2} ${y:2:3} ${z:2:3} a
9423 echo b ${x::3} ${y::3} ${z::3} b
9424 echo c ${x:2:} ${y:2:} ${z:2:} c
9425 echo d ${x:2} ${y:2} ${z:2} d
9426 echo e ${x:2:6} ${y:2:6} ${z:2:7} e
9427 echo f ${x:2:7} ${y:2:7} ${z:2:8} f
9428 echo g ${x:2:8} ${y:2:8} ${z:2:9} g
9447 echo a ${x:$n:3} ${y:$n:3} ${z:$n:3} a
9448 echo b ${x:(n):3} ${y:(n):3} ${z:(n):3} b
9449 echo c ${x:(-2):1} ${y:(-2):1} ${z:(-2):1} c
9450 echo d t${x: n:2} ${y: n:3} ${z: n:3} d
9463 "$__progname" -c 'echo v${x:(n)}x'
9464 "$__progname" -c 'echo w${x: n}x'
9465 "$__progname" -c 'echo x${x:n}x'
9466 "$__progname" -c 'echo y${x:}x'
9467 "$__progname" -c 'echo z${x}x'
9469 "$__progname" -c 'x=abcdef;y=123;echo ${x:${y:2:1}:2}' >/dev/null 2>&1; echo $?
9484 echo a ${x:(y == 1 ? 2 : 3):4} a
9494 echo a ${x::1} ${x: -1} a
9495 echo b ${x::3} ${x: -3} b
9496 echo c ${x:1:2} ${x: -3:2} c
9497 echo d ${#x} d
9510 echo a ${x::1} ${x: -1} a
9511 echo b ${x::2} ${x: -2} b
9512 echo c ${x:1:1} ${x: -2:1} c
9513 echo d ${#x} d
9527 echo a ${baz: foo: bar}
9528 echo b ${baz: foo: $bar}
9529 echo c ${baz: $foo: bar}
9530 echo d ${baz: $foo: $bar}
9634 echo .
9642 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
9646 n() { echo "$#"; }
9750 echo '#!'"$__progname" >foo
9756 echo "[$(./foo)]"
9782 echo .${#x} #
9789 echo "[$("$__progname" foo)]"
9809 echo .${#x} #
9816 echo "[$("$__progname" foo)]"
9834 echo .${#x} #
9841 echo "[$("$__progname" foo)]"
9931 echo $"Localise me!"
10017 echo "1 foo\"bar"
10027 echo "^$"
10065 echo 1 $? .
10074 alias foo='echo bar'
10077 echo baz
10081 foo 2>/dev/null || echo rab
10083 alias korn='echo bar'
10086 echo baz
10091 echo bfn
10094 alias bla='echo bal'
10114 echo '#!'"$__progname"
10115 echo "$1 {"
10116 echo ' echo "bar='\''$0'\'\"
10117 echo '}'
10126 x="korn: $(./f-korn)"; echo "${x/@("$u")/.}"
10127 x="dash: $(./f-dash)"; echo "${x/@("$u")/.}"
10128 x="bash: $(./f-bash)"; echo "${x/@("$u")/.}"
10145 echo "in <$i0> <$i1>"
10146 echo "out <${o0a#1#}|${o0b#1#}> <${o1a#1#}|${o1b#1#}>"
10148 echo "pass <$px> <$p0> <$p1> <$pl> <${i0#1#}|${i1#1#}>"
10150 …echo "specX <${tv1#16#}> <${tv2#16#}> <${tv3#16#}> <${tv4#16#}> <${tv5#16#}> <${tv6#16#}> <${tv7#1…
10152 …echo "specW <${tv1#1#}> <${tv2#1#}> <${tv3#1#}> <${tv4#1#}> <${tv5#1#}> <${tv6#1#}> <${tv7#1#}> <$…
10154 echo "specU <${xs1#1#}> <${xs2#1#}> <${xs3#1#}>"
10169 echo /$x/
10180 echo /$x/
10191 echo /$x/
10201 echo /$x/
10212 echo /$x/ # invalid utf-8
10222 echo /$x/ # invalid 2-byte
10232 echo /$x/ # invalid 2-byte
10242 echo /$x/ # invalid 3-byte
10253 echo /$x/ # non-minimalistic
10264 echo /$x/ # non-minimalistic
10609 echo 1 $(('a'))
10610 (echo 2f $(('aa'))) 2>&1 | sed "s/^[^']*'/2p '/"
10611 echo 3 $(('…'))
10613 echo "4 <$x>"
10614 echo 5 $(($x))
10615 echo 6 $((x))
10678 #echo expected to fail on this OS
10679 echo okay
10681 ulimit -dS $x && echo okay
10696 echo =1=
10698 echo =2=
10700 echo =3=
10702 echo =4=
10704 echo =5=
10723 echo ras
10724 echo dwa >&2
10725 echo tri >&3
10728 echo ===
10743 echo ras
10744 echo dwa >&2
10745 echo tri >&3
10748 echo ===
10763 echo ras
10764 echo dwa >&2
10765 echo tri >&3
10768 echo ===
10781 echo mir >foo
10785 echo ras
10786 echo dwa >&2
10787 echo tri >&3
10790 echo ===
10804 echo mir >foo
10808 echo ras
10809 echo dwa >&2
10810 echo tri >&3
10813 echo ===
10825 echo mir >foo
10829 echo ras
10830 echo dwa >&2
10831 echo tri >&3
10834 echo ===
10850 echo ras
10851 echo dwa >&2
10852 echo tri >&3
10858 echo -n >bar
10860 echo ===
10873 :>x; echo 1 "$("$__progname" -c 'echo foo>/dev/null&>x echo bar')" = "$(<x)" .
10874 :>x; echo 2 "$("$__progname" -o posix -c 'echo foo>/dev/null&>x echo bar')" = "$(<x)" .
10875 :>x; echo 3 "$("$__progname" -o sh -c 'echo foo>/dev/null&>x echo bar')" = "$(<x)" .
10877 1 = foo echo bar .
10886 for n in ${a#*=}; do echo 1hu ${n} .; done
10887 for n in "${a#*=}"; do echo 1hq ${n} .; done
10888 for n in ${a##*=}; do echo 2hu ${n} .; done
10889 for n in "${a##*=}"; do echo 2hq ${n} .; done
10890 for n in ${a%=*}; do echo 1pu ${n} .; done
10891 for n in "${a%=*}"; do echo 1pq ${n} .; done
10892 for n in ${a%%=*}; do echo 2pu ${n} .; done
10893 for n in "${a%%=*}"; do echo 2pq ${n} .; done
10905 echo "should not print"
10914 echo "should not print"
10923 echo "should not print"
11005 trap 'echo EXIT' EXIT
11006 trap 'echo ERR' ERR
11009 echo DONE
11021 echo $( set -e; false; echo foo )
11039 set foo bar baz ; for out in ; do echo $out ; done
11057 echo 1
11062 echo 2
11070 echo 3
11075 echo 4
11156 echo 1 $(case 1 in (1) echo yes;; (2) echo no;; esac) .
11157 echo 2 $(case 1 in 1) echo yes;; 2) echo no;; esac) .
11158 TEST=1234; echo 3 ${TEST: $(case 1 in (1) echo 1;; (*) echo 2;; esac)} .
11159 TEST=5678; echo 4 ${TEST: $(case 1 in 1) echo 1;; *) echo 2;; esac)} .
11160 a=($(case 1 in (1) echo 1;; (*) echo 2;; esac)); echo 5 ${a[0]} .
11161 a=($(case 1 in 1) echo 1;; *) echo 2;; esac)); echo 6 ${a[0]} .
11176 echo 1 $(($(case 1 in (1) echo 1;; (*) echo 2;; esac)+10)) .
11177 echo 2 $(($(case 1 in 1) echo 1;; *) echo 2;; esac)+20)) .
11178 (( a = $(case 1 in (1) echo 1;; (*) echo 2;; esac) )); echo 3 $a .
11179 (( a = $(case 1 in 1) echo 1;; *) echo 2;; esac) )); echo 4 $a .
11180 a=($(($(case 1 in (1) echo 1;; (*) echo 2;; esac)+10))); echo 5 ${a[0]} .
11181 a=($(($(case 1 in 1) echo 1;; *) echo 2;; esac)+20))); echo 6 ${a[0]} .
11200 echo yes
11203 echo $x
11214 echo $(typeset -i10 x=16#20; echo $x)
11215 echo $(typeset -Uui16 x=16#$(id -u)
11217 echo $(c=1; d=1
11220 echo $a $b $c $d)
11231 x() { case $1 in u) echo x ;;& *) echo $1 ;; esac; }
11237 \echo x
11240 \echo $1
11252 alias echo='echo a'
11254 echo moo
11255 ./pfn "$(echo foo)"
11257 ./pfn "$(echo b)"
11267 \echo a moo
11268 ./pfn "$(\echo a foo )"
11273 \echo a moo
11274 ./pfn "$(\echo a foo )"
11283 if [[ -z $__progname ]]; then echo >&2 call me with __progname; exit 1; fi
11314 (echo $foo | tr -dc 0-9; echo)
11316 cmd && echo ja || echo nein
11318 select file in *; do echo "<$file>" ; break ; done
11320 time for i in {1,2,3} ; do echo $i ; done
11322 case $foo in 1) echo eins;& 2) echo zwei ;| *) echo kann net bis drei zählen;; esac
11324 if ! [[ 1 = 1 ]] ; then echo eins; elif [[ 1 = 2 ]]; then echo zwei ;else echo drei; fi
11326 i=1; while (( i < 10 )); do echo $i; let ++i; done
11328 i=10; until (( !--i )) ; do echo $i; done
11332 function korn { echo eins; echo zwei ; }
11347 echo $(true) $((1+ 2)) ${ :;} ${| REPLY=x;}
11349 echo fo\ob\"a\`r\'b\$az
11350 echo "fo\ob\"a\`r\'b\$az"
11351 echo 'fo\ob\"a\`r'\''b\$az'
11357 EOFN); echo $x
11361 EOFN ); echo $x
11403 (echo $foo | tr -dc 0-9; echo)
11406 ( \echo $foo | \tr -dc 0-9
11407 \echo )
11410 (echo $foo | tr -dc 0-9; echo)
11413 x=$( ( \echo $foo | \tr -dc 0-9 ; \echo ) )
11416 (echo $foo | tr -dc 0-9; echo)
11419 x=$( ( ( \echo $foo | \tr -dc 0-9 ; \echo ) ) | \tr u x )
11422 cmd && echo ja || echo nein
11425 \cmd && \echo ja || \echo nein
11428 cmd && echo ja || echo nein
11431 x=$(\cmd && \echo ja || \echo nein )
11434 cmd && echo ja || echo nein
11437 x=$( ( \cmd && \echo ja || \echo nein ) | \tr u x )
11440 select file in *; do echo "<$file>" ; break ; done
11445 \echo "<$file>"
11450 select file in *; do echo "<$file>" ; break ; done
11453 x=$(select file in * ; do \echo "<$file>" ; \break ; done )
11456 select file in *; do echo "<$file>" ; break ; done
11459 x=$( ( select file in * ; do \echo "<$file>" ; \break ; done ) | \tr u x )
11462 time for i in {1,2,3} ; do echo $i ; done
11467 \echo $i
11471 time for i in {1,2,3} ; do echo $i ; done
11474 x=$(time for i in {1,2,3} ; do \echo $i ; done )
11477 time for i in {1,2,3} ; do echo $i ; done
11480 x=$( ( time for i in {1,2,3} ; do \echo $i ; done ) | \tr u x )
11483 case $foo in 1) echo eins;& 2) echo zwei ;| *) echo kann net bis drei zählen;; esac
11488 \echo eins
11491 \echo zwei
11494 \echo kann net bis drei zählen
11499 case $foo in 1) echo eins;& 2) echo zwei ;| *) echo kann net bis drei zählen;; esac
11502 …x=$(case $foo in (1) \echo eins ;& (2) \echo zwei ;| (*) \echo kann net bis drei zählen ;; esac…
11505 case $foo in 1) echo eins;& 2) echo zwei ;| *) echo kann net bis drei zählen;; esac
11508 …x=$( ( case $foo in (1) \echo eins ;& (2) \echo zwei ;| (*) \echo kann net bis drei zählen ;; e…
11511 if ! [[ 1 = 1 ]] ; then echo eins; elif [[ 1 = 2 ]]; then echo zwei ;else echo drei; fi
11516 \echo eins
11519 \echo zwei
11521 \echo drei
11525 if ! [[ 1 = 1 ]] ; then echo eins; elif [[ 1 = 2 ]]; then echo zwei ;else echo drei; fi
11528 …x=$(if ! [[ 1 = 1 ]] ; then \echo eins ; elif [[ 1 = 2 ]] ; then \echo zwei ; else \echo drei ; fi…
11531 if ! [[ 1 = 1 ]] ; then echo eins; elif [[ 1 = 2 ]]; then echo zwei ;else echo drei; fi
11534 …x=$( ( if ! [[ 1 = 1 ]] ; then \echo eins ; elif [[ 1 = 2 ]] ; then \echo zwei ; else \echo drei ;…
11537 i=1; while (( i < 10 )); do echo $i; let ++i; done
11545 \echo $i
11550 i=1; while (( i < 10 )); do echo $i; let ++i; done
11553 x=$(i=1 ; while { \\builtin let " i < 10 " ; } ; do \echo $i ; \let ++i ; done )
11556 i=1; while (( i < 10 )); do echo $i; let ++i; done
11559 x=$( ( i=1 ; while { \\builtin let " i < 10 " ; } ; do \echo $i ; \let ++i ; done ) | \tr u x )
11562 i=10; until (( !--i )) ; do echo $i; done
11570 \echo $i
11574 i=10; until (( !--i )) ; do echo $i; done
11577 x=$(i=10 ; until { \\builtin let " !--i " ; } ; do \echo $i ; done )
11580 i=10; until (( !--i )) ; do echo $i; done
11583 x=$( ( i=10 ; until { \\builtin let " !--i " ; } ; do \echo $i ; done ) | \tr u x )
11605 function korn { echo eins; echo zwei ; }
11610 \echo eins
11611 \echo zwei
11618 function korn { echo eins; echo zwei ; }
11622 x=$(function korn { \echo eins ; \echo zwei ; } ; bourne() { \logger * & } )
11625 function korn { echo eins; echo zwei ; }
11629 x=$( ( function korn { \echo eins ; \echo zwei ; } ; bourne() { \logger * & } ) | \tr u x )
11734 echo $(true) $((1+ 2)) ${ :;} ${| REPLY=x;}
11737 \echo $(\true ) $((1+ 2)) ${ \: ;} ${|REPLY=x ;}
11740 echo $(true) $((1+ 2)) ${ :;} ${| REPLY=x;}
11743 x=$(\echo $(\true ) $((1+ 2)) ${ \: ;} ${|REPLY=x ;} )
11746 echo $(true) $((1+ 2)) ${ :;} ${| REPLY=x;}
11749 x=$( ( \echo $(\true ) $((1+ 2)) ${ \: ;} ${|REPLY=x ;} ) | \tr u x )
11752 echo fo\ob\"a\`r\'b\$az
11753 echo "fo\ob\"a\`r\'b\$az"
11754 echo 'fo\ob\"a\`r'\''b\$az'
11757 \echo fo\ob\"a\`r\'b\$az
11758 \echo "fo\ob\"a\`r\'b\$az"
11759 \echo "fo\\ob\\\"a\\\`r"\'"b\\\$az"
11762 echo fo\ob\"a\`r\'b\$az
11763 echo "fo\ob\"a\`r\'b\$az"
11764 echo 'fo\ob\"a\`r'\''b\$az'
11767 x=$(\echo fo\ob\"a\`r\'b\$az ; \echo "fo\ob\"a\`r\'b\$az" ; \echo "fo\\ob\\\"a\\\`r"\'"b\\\$az" )
11770 echo fo\ob\"a\`r\'b\$az
11771 echo "fo\ob\"a\`r\'b\$az"
11772 echo 'fo\ob\"a\`r'\''b\$az'
11775 …x=$( ( \echo fo\ob\"a\`r\'b\$az ; \echo "fo\ob\"a\`r\'b\$az" ; \echo "fo\\ob\\\"a\\\`r"\'"b\\\$az"…
11798 EOFN); echo $x
11805 \echo $x
11810 EOFN); echo $x
11816 ) ; \echo $x )
11821 EOFN); echo $x
11827 ) ; \echo $x ) | \tr u x )
11832 EOFN ); echo $x
11839 \echo $x
11844 EOFN ); echo $x
11850 ) ; \echo $x )
11855 EOFN ); echo $x
11861 ) ; \echo $x ) | \tr u x )
11984 if [[ -z $__progname ]]; then echo >&2 call me with __progname; exit 1; fi
12015 (echo $foo | tr -dc 0-9 >&3; echo >&3) >&3
12017 cmd >&3 && >&3 echo ja || echo >&3 nein
12019 select file in *; do echo "<$file>" ; break >&3 ; done >&3
12021 for i in {1,2,3} ; do time >&3 echo $i ; done >&3
12023 …case $foo in 1) echo eins >&3;& 2) echo zwei >&3 ;| *) echo kann net bis drei zählen >&3;; e…
12025 …if ! [[ 1 = 1 ]] >&3 ; then echo eins; elif [[ 1 = 2 ]] >&3; then echo zwei ;else echo …
12027 i=1; while (( i < 10 )) >&3; do echo $i; let ++i; done >&3
12029 i=10; until (( !--i )) >&3 ; do echo $i; done >&3
12033 function korn { echo eins; echo >&3 zwei ; }
12036 echo $(true >&3) $((1+ 2))
12059 (echo $foo | tr -dc 0-9 >&3; echo >&3) >&3
12062 ( \echo $foo | \tr -dc 0-9 >&3
12063 \echo >&3 ) >&3
12066 (echo $foo | tr -dc 0-9 >&3; echo >&3) >&3
12069 x=$( ( \echo $foo | \tr -dc 0-9 >&3 ; \echo >&3 ) >&3 )
12072 (echo $foo | tr -dc 0-9 >&3; echo >&3) >&3
12075 x=$( ( ( \echo $foo | \tr -dc 0-9 >&3 ; \echo >&3 ) >&3 ) | \tr u x )
12078 cmd >&3 && >&3 echo ja || echo >&3 nein
12081 \cmd >&3 && \echo ja >&3 || \echo nein >&3
12084 cmd >&3 && >&3 echo ja || echo >&3 nein
12087 x=$(\cmd >&3 && \echo ja >&3 || \echo nein >&3 )
12090 cmd >&3 && >&3 echo ja || echo >&3 nein
12093 x=$( ( \cmd >&3 && \echo ja >&3 || \echo nein >&3 ) | \tr u x )
12096 select file in *; do echo "<$file>" ; break >&3 ; done >&3
12101 \echo "<$file>"
12106 select file in *; do echo "<$file>" ; break >&3 ; done >&3
12109 x=$(select file in * ; do \echo "<$file>" ; \break >&3 ; done >&3 )
12112 select file in *; do echo "<$file>" ; break >&3 ; done >&3
12115 x=$( ( select file in * ; do \echo "<$file>" ; \break >&3 ; done >&3 ) | \tr u x )
12118 for i in {1,2,3} ; do time >&3 echo $i ; done >&3
12123 time \echo $i >&3
12127 for i in {1,2,3} ; do time >&3 echo $i ; done >&3
12130 x=$(for i in {1,2,3} ; do time \echo $i >&3 ; done >&3 )
12133 for i in {1,2,3} ; do time >&3 echo $i ; done >&3
12136 x=$( ( for i in {1,2,3} ; do time \echo $i >&3 ; done >&3 ) | \tr u x )
12139 …case $foo in 1) echo eins >&3;& 2) echo zwei >&3 ;| *) echo kann net bis drei zählen >&3;; e…
12144 \echo eins >&3
12147 \echo zwei >&3
12150 \echo kann net bis drei zählen >&3
12155 …case $foo in 1) echo eins >&3;& 2) echo zwei >&3 ;| *) echo kann net bis drei zählen >&3;; e…
12158 …x=$(case $foo in (1) \echo eins >&3 ;& (2) \echo zwei >&3 ;| (*) \echo kann net bis drei zählen …
12161 …case $foo in 1) echo eins >&3;& 2) echo zwei >&3 ;| *) echo kann net bis drei zählen >&3;; e…
12164 …x=$( ( case $foo in (1) \echo eins >&3 ;& (2) \echo zwei >&3 ;| (*) \echo kann net bis drei zähl…
12167 …if ! [[ 1 = 1 ]] >&3 ; then echo eins; elif [[ 1 = 2 ]] >&3; then echo zwei ;else echo …
12172 \echo eins
12175 \echo zwei
12177 \echo drei
12181 …if ! [[ 1 = 1 ]] >&3 ; then echo eins; elif [[ 1 = 2 ]] >&3; then echo zwei ;else echo …
12184 …x=$(if ! [[ 1 = 1 ]] >&3 ; then \echo eins ; elif [[ 1 = 2 ]] >&3 ; then \echo zwei ; else \echo d…
12187 …if ! [[ 1 = 1 ]] >&3 ; then echo eins; elif [[ 1 = 2 ]] >&3; then echo zwei ;else echo …
12190 …x=$( ( if ! [[ 1 = 1 ]] >&3 ; then \echo eins ; elif [[ 1 = 2 ]] >&3 ; then \echo zwei ; else \ech…
12193 i=1; while (( i < 10 )) >&3; do echo $i; let ++i; done >&3
12201 \echo $i
12206 i=1; while (( i < 10 )) >&3; do echo $i; let ++i; done >&3
12209 x=$(i=1 ; while { \\builtin let " i < 10 " ; } >&3 ; do \echo $i ; \let ++i ; done >&3 )
12212 i=1; while (( i < 10 )) >&3; do echo $i; let ++i; done >&3
12215 …x=$( ( i=1 ; while { \\builtin let " i < 10 " ; } >&3 ; do \echo $i ; \let ++i ; done >&3 ) | \tr …
12218 i=10; until (( !--i )) >&3 ; do echo $i; done >&3
12226 \echo $i
12230 i=10; until (( !--i )) >&3 ; do echo $i; done >&3
12233 x=$(i=10 ; until { \\builtin let " !--i " ; } >&3 ; do \echo $i ; done >&3 )
12236 i=10; until (( !--i )) >&3 ; do echo $i; done >&3
12239 x=$( ( i=10 ; until { \\builtin let " !--i " ; } >&3 ; do \echo $i ; done >&3 ) | \tr u x )
12261 function korn { echo eins; echo >&3 zwei ; }
12266 \echo eins
12267 \echo zwei >&3
12274 function korn { echo eins; echo >&3 zwei ; }
12278 x=$(function korn { \echo eins ; \echo zwei >&3 ; } ; bourne() { \logger * >&3 & } )
12281 function korn { echo eins; echo >&3 zwei ; }
12285 …x=$( ( function korn { \echo eins ; \echo zwei >&3 ; } ; bourne() { \logger * >&3 & } ) | \tr u x…
12288 echo $(true >&3) $((1+ 2))
12291 \echo $(\true >&3 ) $((1+ 2))
12294 echo $(true >&3) $((1+ 2))
12297 x=$(\echo $(\true >&3 ) $((1+ 2)) )
12300 echo $(true >&3) $((1+ 2))
12303 x=$( ( \echo $(\true >&3 ) $((1+ 2)) ) | \tr u x )
12312 echo "ob $foo ."
12313 echo "${
12314 echo "ib $foo :"
12316 echo "ia $foo :"
12319 echo "oa $foo ."
12331 x=q; e=1; x=${ echo a; e=2; echo x$e;}; echo 1:y$x,$e,$?.
12332 x=q; e=1; x=${ echo a; typeset e=2; echo x$e;}; echo 2:y$x,$e,$?.
12333 x=q; e=1; x=${ echo a; typeset e=2; return 3; echo x$e;}; echo 3:y$x,$e,$?.
12347 echo "before: x<$x> y<$y> z<$z> R<$REPLY>"
12350 echo "start: x<$x> y<$y> z<$z> R<$REPLY>"
12355 echo "end: x<$x> y<$y> z<$z> R<$REPLY>"
12357 echo "after: x<$x> y<$y> z<$z> R<$REPLY>"
12361 echo -n this used to segfault
12362 echo ${|true;}$(true).
12376 echo molto bene
12380 echo si
12384 echo yeap
12386 echo meow
12388 echo = $?
12390 ! false; then echo foo; else echo bar; fi
12406 echo molto bene
12410 echo si
12414 echo yeap
12416 echo meow
12418 echo = $?
12420 ! false; then echo foo; else echo bar; fi
12440 echo $1=nz
12442 echo $1=zf
12446 (echo $x)
12447 echo =1
12448 (echo $y)
12449 echo =2
12451 echo =3
12453 echo =4
12455 echo =5
12457 echo =6
12459 echo =7
12460 (echo at=$@)
12461 echo =8
12462 (echo asterisk=$*)
12463 echo =9
12464 (echo $?)
12465 echo =10
12466 (echo $!)
12467 echo =11
12468 (echo $-)
12469 echo =12
12470 #(echo $_)
12471 #echo =13
12472 (echo $#)
12473 echo =14
12475 echo =15
12515 echo !ind: ${!ind}
12516 echo ind: $ind
12517 echo !ir2: ${!ir2}
12518 echo ir2: $ir2
12520 echo !ind: ${!ind}
12521 echo ind: $ind
12523 echo !ir2: ${!ir2}
12524 echo ir2: $ir2
12530 echo !ind[1]: ${!ind[1]}
12531 echo !ir2: $!ir2
12532 echo ind[1]: ${ind[1]}
12533 echo ir2: $ir2
12558 echo entering
12559 echo !v: ${!v}
12560 echo !bar: ${!bar}
12561 echo !baz: ${!baz}
12562 echo bar: $bar
12563 echo v: $v
12565 echo bar: $bar
12566 echo v: $v
12567 echo exiting
12570 echo bar: $bar
12572 echo bar: $bar
12611 echo sind $foo .
12613 echo blah $foo .
12624 if ( (echo fubar)|tr u x); then
12625 echo ja
12627 echo nein
12637 echo $( (echo fubar)|tr u x) $?
12645 x=$( (echo fubar)|tr u x); echo $x $?
12653 if ((echo fubar)|tr u x); then
12654 echo ja
12656 echo nein
12666 echo $((echo fubar)|tr u x) $?
12674 x=$((echo fubar)|tr u x); echo $x $?
12682 if ( (echo fubar)|(tr u x)); then
12683 echo ja
12685 echo nein
12695 echo $( (echo fubar)|(tr u x)) $?
12703 x=$( (echo fubar)|(tr u x)); echo $x $?
12711 if ((echo fubar)|(tr u x)); then
12712 echo ja
12714 echo nein
12724 echo $((echo fubar)|(tr u x)) $?
12732 x=$((echo fubar)|(tr u x)); echo $x $?
12740 ( (echo 'fo o$bar' "baz\$bla\"" m\$eh) | tr a A)
12741 ((echo 'fo o$bar' "baz\$bla\"" m\$eh) | tr a A)
12746 name: echo-test-1
12748 Test what the echo builtin does (mksh)
12751 echo -n 'foo\x40bar'
12752 echo -e '\tbaz'
12756 name: echo-test-1-ebcdic
12758 Test what the echo builtin does (mksh)
12761 echo -n 'foo\x7Cbar'
12762 echo -e '\tbaz'
12766 name: echo-test-2
12768 Test what the echo builtin does (POSIX)
12775 echo -n 'foo\x40bar'
12776 echo -e '\tbaz'
12780 name: echo-test-3-mnbsd
12782 Test what the echo builtin does, and test a compatibility flag.
12785 "$__progname" -c 'echo -n 1=\\x40$1; echo -e \\x2E' -- foo bar
12786 "$__progname" -o posix -c 'echo -n 2=\\x40$1; echo -e \\x2E' -- foo bar
12787 "$__progname" -o sh -c 'echo -n 3=\\x40$1; echo -e \\x2E' -- foo bar
12793 name: echo-test-3-normal
12795 Test what the echo builtin does, and test a compatibility flag.
12798 "$__progname" -c 'echo -n 1=\\x40$1; echo -e \\x2E' -- foo bar
12799 "$__progname" -o posix -c 'echo -n 2=\\x40$1; echo -e \\x2E' -- foo bar
12800 "$__progname" -o sh -c 'echo -n 3=\\x40$1; echo -e \\x2E' -- foo bar
12806 name: echo-test-3-ebcdic
12808 Test what the echo builtin does, and test a compatibility flag.
12811 "$__progname" -c 'echo -n 1=\\x7C$1; echo -e \\x4B' -- foo bar
12812 "$__progname" -o posix -c 'echo -n 2=\\x7C$1; echo -e \\x4B' -- foo bar
12813 "$__progname" -o sh -c 'echo -n 3=\\x7C$1; echo -e \\x4B' -- foo bar
12825 echo "OPTARG=$OPTARG, OPTIND=$OPTIND, optc=$optc."
12827 echo done
12840 echo "OPTARG=$OPTARG, OPTIND=$OPTIND, optc=$optc."
12842 echo done
12854 getopts x:y opt && echo "${OPTARG-unset}"
12855 getopts x:y opt && echo "${OPTARG-unset}"
13056 "$__progname" -c 'x=$(tr z r <<<baz); echo $x'
13064 test \( ! -e \) ; echo $?
13072 test \( -e \) ; echo $?
13080 test ! -e ; echo $?
13088 test -e ; echo $?
13097 a) echo a ;;
13098 b) echo b ;;
13099 c) echo c ;;
13100 *) echo x ;;
13102 echo =
13104 a) echo a ;&
13105 b) echo b ;&
13106 c) echo c ;&
13107 *) echo x ;&
13109 echo =
13111 a) echo a ;|
13112 b) echo b ;|
13113 c) echo c ;|
13114 *) echo x ;|
13134 }) echo brace ;;
13135 *) echo no ;;
13139 esac) echo esac ;;
13140 *) echo no ;;
13156 echo "before 0='$0' 1='$1' 2='$2'"
13158 echo "after 0='$0' 1='$1' 2='$2'"
13161 echo "before 0='$0' 1='$1' 2='$2'"
13163 echo "after 0='$0' 1='$1' 2='$2'"
13165 echo = without command
13167 echo = with command
13169 echo = done
13351 echo 'GNU bash, version 2.05b.0(1)-release (i386-ecce-mirbsd10)
13355 "$__progname" -xc 'foo=$(./bash --version 2>&1 | sed q); echo "=$foo="'
13393 echo 2 "${-/s}" .
13396 echo 1 "${-/s}" .
13398 echo 3 "${-/s}" .
13413 echo 2 "${-/s}" .
13416 echo 1 "${-/s}" .
13418 echo 3 "${-/s}" .
13432 echo 2 "${-/s}" .
13435 echo 1 "${-/s}" .
13437 echo 3 "${-/s}" .