• Home
  • Raw
  • Download

Lines Matching refs:echo

38 	echo ${KSH_VERSION%%' +'*}
47 echo ${KSH_VERSION%%' +'*}
95 echo ${foo:-baz}
104 echo ${foo:-baz}
113 echo "<$ENV>"
141 ln -s "$__progname" echo || cp "$__progname" echo
142 ./echo -c 'echo foo' | ./cat -u
144 -c echo foo
177 echo ok
192 echo ok
224 alias Echo='echo '
239 alias Echo='echo '
241 while false; do echo hi ; done
250 alias Echo='echo '
263 alias Echo='echo '
278 X Y in 'Y') echo is y ;; Z) echo is z ;; esac
289 echo hi
293 echo there
314 echo = now
317 echo = out
332 echo $(bar)
360 alias echo=print
361 x() { echo a; (echo b); x=$(echo c); }
364 { OPEN echo hi1; CLOSE }
365 var=`{ OPEN echo hi2; CLOSE }` && echo "$var"
366 var=$({ OPEN echo hi3; CLOSE }) && echo "$var"
392 echo $((1 ? 20 : (x+=2)))
393 echo $i,$x
394 echo $((0 ? (y+=2) : 30))
395 echo $j,$y
410 echo $((1 ? 20 : (x+=2)))
411 echo $i,$x
412 echo $((0 ? (y+=2) : 30))
413 echo $i,$y
427 echo = $x $y =
437 echo "($n, $m)"
438 m=0; echo $(( 0 ? ++m : 2 )); echo $m
439 m=0; echo $(( 0 ? m++ : 2 )); echo $m
450 a=0; echo "$((0&&b[a++],a))"
457 a=0; echo "$((0&&(b[a++]),a))"
464 a=0 b=a++; ((0&&b)); echo $a
471 a=0 b=a++; ((0&&(b))); echo $a
478 a=0; echo "$((0?b[a++]:999,a))"
485 a=0; echo "$((0?(b[a++]):999,a))"
492 a=0; echo "$((1?999:b[a++],a))"
499 a=0; echo "$((1?999:(b[a++]),a))"
518 echo $((0 ? x+=2 : 20))
538 echo $((20 / 2 / 2))
546 x=$(echo $((1 / 0)))
547 echo =$?:$x.
558 echo signed:$((-2147483648 / -1))r$((-2147483648 % -1)).
559 echo unsigned:$((# -2147483648 / -1))r$((# -2147483648 % -1)).
569 echo signed:$((-9223372036854775808 / -1))r$((-9223372036854775808 % -1)).
570 echo unsigned:$((# -9223372036854775808 / -1))r$((# -9223372036854775808 % -1)).
580 echo $((i += j += k))
581 echo $i,$j,$k
635 echo x1 $((-1)) $((#-1))
640 echo x2 $vs $vu
643 echo x3 $vs $vu
647 echo x4 $vs $vu
650 echo x5 $vs $vu
652 echo x6 $((# vs % 2147483647)) $((# vu % 2147483647))
657 echo x7 ${va[#4123456789%2147483647]}
660 echo x8 $mca $mcb
677 echo x1 $((-1)) $((#-1))
682 echo x2 $vs $vu
684 echo x3 $vs $vu
686 echo x4 $vs $vu
688 echo x5 $vs $vu
690 echo x6 $vs $vu
705 echo x1 $((-1)) $((#-1))
710 echo x2 $vs $vu
712 echo x3 $vs $vu
714 echo x4 $vs $vu
716 echo x5 $vs $vu
718 echo x6 $vs $vu
731 echo hi #there \
732 echo folks
741 echo 'hi \
743 echo folks
768 alias x='echo hi
790 echo `echo foo\\`bar
791 echo hi\
805 echo hi\
818 echo $\
820 echo $a\
822 echo $\
824 echo ${a\
826 echo ${ab\
840 echo $\
841 (echo foobar1)
842 echo $(\
843 echo foobar2)
844 echo $(echo foo\
846 echo $(echo foobar4\
848 echo `
849 echo stuff1`
850 echo `echo st\
865 echo $\
867 echo $(\
869 echo $((\
871 echo $((1+\
873 echo $((1+2+3+4+5+6)\
886 echo "\
888 echo "foo\
890 echo "folks\
913 echo done
932 echo done
945 echo hi &\
946 & echo there
947 echo foo |\
948 | echo bar
962 echo hi >\
964 echo $?
970 ) echo hi;\
972 (*) echo oops
990 alias x='echo hi\'
992 echo there
1002 echo pass; el\
1003 se echo fail; fi
1021 ) echo ok ;;
1022 *) echo bad
1038 echo $i
1046 for i in a b c; do echo $i; break; echo bad-$i; done
1047 echo end-1
1048 for i in a b c; do echo $i; break 1; echo bad-$i; done
1049 echo end-2
1052 echo $i:$j
1054 echo bad-$i
1056 echo end-$i
1058 echo end-3
1059 for i in a b c; do echo $i; eval break; echo bad-$i; done
1060 echo end-4
1082 echo $i:$j
1084 echo bad-$i
1086 echo end-$i
1088 echo end
1107 for i in a b c; do echo $i; break 2; echo bad-$i; done
1108 echo end
1119 for i in a b c; do echo $i; break abc; echo more-$i; done
1120 echo end
1131 for i in a b c; do echo $i; continue; echo bad-$i ; done
1132 echo end-1
1133 for i in a b c; do echo $i; continue 1; echo bad-$i; done
1134 echo end-2
1137 echo $i:$j
1139 echo bad-$i-$j
1141 echo end-$i
1143 echo end-3
1144 for i in a b c; do echo $i; eval continue; echo bad-$i ; done
1145 echo end-4
1179 echo $i:$j
1181 echo bad-$i-$j
1183 echo end-$i
1185 echo end
1206 for i in a b c; do echo $i; continue 2; echo bad-$i; done
1207 echo end
1220 for i in a b c; do echo $i; continue abc; echo more-$i; done
1221 echo end
1401 echo 0=$?
1404 echo 1=$?,${PWD#$bwd/}
1407 #echo pwd=$?,$epwd
1411 echo 2=$?,${PWD#$bwd/}
1418 echo "now with -e:"
1436 false && echo hmmm
1440 echo hi${XXX}there
1453 (echo 1 ${IFS+'}'z}) 2>/dev/null || echo failed in 1
1454 (echo 2 "${IFS+'}'z}") 2>/dev/null || echo failed in 2
1455 (echo 3 "foo ${IFS+'bar} baz") 2>/dev/null || echo failed in 3
1456 (echo -n '4 '; ./pfn "foo ${IFS+"b c"} baz") 2>/dev/null || echo failed in 4
1457 (echo -n '5 '; ./pfn "foo ${IFS+b c} baz") 2>/dev/null || echo failed in 5
1458 (echo 6 ${IFS+"}"z}) 2>/dev/null || echo failed in 6
1459 (echo 7 "${IFS+"}"z}") 2>/dev/null || echo failed in 7
1460 (echo 8 "${IFS+\"}\"z}") 2>/dev/null || echo failed in 8
1461 (echo 9 "${IFS+\"\}\"z}") 2>/dev/null || echo failed in 9
1462 (echo 10 foo ${IFS+'bar} baz'}) 2>/dev/null || echo failed in 10
1463 (echo 11 "$(echo "${IFS+'}'z}")") 2>/dev/null || echo failed in 11
1464 (echo 12 "$(echo ${IFS+'}'z})") 2>/dev/null || echo failed in 12
1465 (echo 13 ${IFS+\}z}) 2>/dev/null || echo failed in 13
1466 (echo 14 "${IFS+\}z}") 2>/dev/null || echo failed in 14
1467 …u=x; (echo -n '15 '; ./pfs "foo ${IFS+a"b$u{ {"{{\}b} c ${IFS+d{}} bar" ${IFS-e{}} baz; echo .) 2>…
1468 l=t; (echo 16 ${IFS+h`echo -n i ${IFS+$l}h`ere}) 2>/dev/null || echo failed in 16
1469 l=t; (echo 17 ${IFS+h$(echo -n i ${IFS+$l}h)ere}) 2>/dev/null || echo failed in 17
1470 l=t; (echo 18 "${IFS+h`echo -n i ${IFS+$l}h`ere}") 2>/dev/null || echo failed in 18
1471 l=t; (echo 19 "${IFS+h$(echo -n i ${IFS+$l}h)ere}") 2>/dev/null || echo failed in 19
1472 l=t; (echo 20 ${IFS+h`echo -n i "${IFS+$l}"h`ere}) 2>/dev/null || echo failed in 20
1473 l=t; (echo 21 ${IFS+h$(echo -n i "${IFS+$l}"h)ere}) 2>/dev/null || echo failed in 21
1474 l=t; (echo 22 "${IFS+h`echo -n i "${IFS+$l}"h`ere}") 2>/dev/null || echo failed in 22
1475 l=t; (echo 23 "${IFS+h$(echo -n i "${IFS+$l}"h)ere}") 2>/dev/null || echo failed in 23
1476 key=value; (echo -n '24 '; ./pfn "${IFS+'$key'}") 2>/dev/null || echo failed in 24
1477 …key=value; (echo -n '25 '; ./pfn "${IFS+"'$key'"}") 2>/dev/null || echo failed in 25 # ksh93: “'$k…
1478 key=value; (echo -n '26 '; ./pfn ${IFS+'$key'}) 2>/dev/null || echo failed in 26
1479 key=value; (echo -n '27 '; ./pfn ${IFS+"'$key'"}) 2>/dev/null || echo failed in 27
1480 (echo -n '28 '; ./pfn "${IFS+"'"x ~ x'}'x"'}"x}" #') 2>/dev/null || echo failed in 28
1481 …u=x; (echo -n '29 '; ./pfs foo ${IFS+a"b$u{ {"{ {\}b} c ${IFS+d{}} bar ${IFS-e{}} baz; echo .) 2>/…
1482 (echo -n '30 '; ./pfs ${IFS+foo 'b\
1483 ar' baz}; echo .) 2>/dev/null || (echo failed in 30; echo failed in 31)
1484 (echo -n '32 '; ./pfs ${IFS+foo "b\
1485 ar" baz}; echo .) 2>/dev/null || echo failed in 32
1486 (echo -n '33 '; ./pfs "${IFS+foo 'b\
1487 ar' baz}"; echo .) 2>/dev/null || echo failed in 33
1488 (echo -n '34 '; ./pfs "${IFS+foo "b\
1489 ar" baz}"; echo .) 2>/dev/null || echo failed in 34
1490 (echo -n '35 '; ./pfs ${v=a\ b} x ${v=c\ d}; echo .) 2>/dev/null || echo failed in 35
1491 (echo -n '36 '; ./pfs "${v=a\ b}" x "${v=c\ d}"; echo .) 2>/dev/null || echo failed in 36
1492 (echo -n '37 '; ./pfs ${v-a\ b} x ${v-c\ d}; echo .) 2>/dev/null || echo failed in 37
1493 (echo 38 ${IFS+x'a'y} / "${IFS+x'a'y}" .) 2>/dev/null || echo failed in 38
1494 foo="x'a'y"; (echo 39 ${foo%*'a'*} / "${foo%*'a'*}" .) 2>/dev/null || echo failed in 39
1495 foo="a b c"; (echo -n '40 '; ./pfs "${foo#a}"; echo .) 2>/dev/null || echo failed in 40
1496 (foo() { return 100; }; foo; echo 41 ${#+${#:+${#?}}\ \}\}\}}) 2>/dev/null || echo failed in 41
1548 (echo "$1 plus norm foo ${v+'bar'} baz")
1549 (echo "$1 dash norm foo ${v-'bar'} baz")
1550 (echo "$1 eqal norm foo ${v='bar'} baz")
1551 (echo "$1 qstn norm foo ${v?'bar'} baz") 2>/dev/null || \
1552 echo "$1 qstn norm -> error"
1553 (echo "$1 PLUS norm foo ${v:+'bar'} baz")
1554 (echo "$1 DASH norm foo ${v:-'bar'} baz")
1555 (echo "$1 EQAL norm foo ${v:='bar'} baz")
1556 (echo "$1 QSTN norm foo ${v:?'bar'} baz") 2>/dev/null || \
1557 echo "$1 QSTN norm -> error"
1562 (echo "$1 plus parn foo ${v+(bar)} baz")
1563 (echo "$1 dash parn foo ${v-(bar)} baz")
1564 (echo "$1 eqal parn foo ${v=(bar)} baz")
1565 (echo "$1 qstn parn foo ${v?(bar)} baz") 2>/dev/null || \
1566 echo "$1 qstn parn -> error"
1567 (echo "$1 PLUS parn foo ${v:+(bar)} baz")
1568 (echo "$1 DASH parn foo ${v:-(bar)} baz")
1569 (echo "$1 EQAL parn foo ${v:=(bar)} baz")
1570 (echo "$1 QSTN parn foo ${v:?(bar)} baz") 2>/dev/null || \
1571 echo "$1 QSTN parn -> error"
1576 (echo "$1 plus brac foo ${v+a$u{{{\}b} c ${v+d{}} baz")
1577 (echo "$1 dash brac foo ${v-a$u{{{\}b} c ${v-d{}} baz")
1578 (echo "$1 eqal brac foo ${v=a$u{{{\}b} c ${v=d{}} baz")
1579 (echo "$1 qstn brac foo ${v?a$u{{{\}b} c ${v?d{}} baz") 2>/dev/null || \
1580 echo "$1 qstn brac -> error"
1581 (echo "$1 PLUS brac foo ${v:+a$u{{{\}b} c ${v:+d{}} baz")
1582 (echo "$1 DASH brac foo ${v:-a$u{{{\}b} c ${v:-d{}} baz")
1583 (echo "$1 EQAL brac foo ${v:=a$u{{{\}b} c ${v:=d{}} baz")
1584 (echo "$1 QSTN brac foo ${v:?a$u{{{\}b} c ${v:?d{}} baz") 2>/dev/null || \
1585 echo "$1 QSTN brac -> error"
1679 (echo $1 plus norm foo ${v+'bar'} baz)
1680 (echo $1 dash norm foo ${v-'bar'} baz)
1681 (echo $1 eqal norm foo ${v='bar'} baz)
1682 (echo $1 qstn norm foo ${v?'bar'} baz) 2>/dev/null || \
1683 echo "$1 qstn norm -> error"
1684 (echo $1 PLUS norm foo ${v:+'bar'} baz)
1685 (echo $1 DASH norm foo ${v:-'bar'} baz)
1686 (echo $1 EQAL norm foo ${v:='bar'} baz)
1687 (echo $1 QSTN norm foo ${v:?'bar'} baz) 2>/dev/null || \
1688 echo "$1 QSTN norm -> error"
1693 (echo $1 plus parn foo ${v+\(bar')'} baz)
1694 (echo $1 dash parn foo ${v-\(bar')'} baz)
1695 (echo $1 eqal parn foo ${v=\(bar')'} baz)
1696 (echo $1 qstn parn foo ${v?\(bar')'} baz) 2>/dev/null || \
1697 echo "$1 qstn parn -> error"
1698 (echo $1 PLUS parn foo ${v:+\(bar')'} baz)
1699 (echo $1 DASH parn foo ${v:-\(bar')'} baz)
1700 (echo $1 EQAL parn foo ${v:=\(bar')'} baz)
1701 (echo $1 QSTN parn foo ${v:?\(bar')'} baz) 2>/dev/null || \
1702 echo "$1 QSTN parn -> error"
1707 (echo $1 plus brac foo ${v+a$u{{{\}b} c ${v+d{}} baz)
1708 (echo $1 dash brac foo ${v-a$u{{{\}b} c ${v-d{}} baz)
1709 (echo $1 eqal brac foo ${v=a$u{{{\}b} c ${v=d{}} baz)
1710 (echo $1 qstn brac foo ${v?a$u{{{\}b} c ${v?d{}} baz) 2>/dev/null || \
1711 echo "$1 qstn brac -> error"
1712 (echo $1 PLUS brac foo ${v:+a$u{{{\}b} c ${v:+d{}} baz)
1713 (echo $1 DASH brac foo ${v:-a$u{{{\}b} c ${v:-d{}} baz)
1714 (echo $1 EQAL brac foo ${v:=a$u{{{\}b} c ${v:=d{}} baz)
1715 (echo $1 QSTN brac foo ${v:?a$u{{{\}b} c ${v:?d{}} baz) 2>/dev/null || \
1716 echo "$1 QSTN brac -> error"
1807 echo "${TEST:1:2:3}"
1808 echo $? but still living
1818 echo ${TEST:1:2:3}
1819 echo $? but still living
1829 echo ${#} # value of $#
1830 echo ${##} # length of $#
1831 echo ${##1} # $# trimmed 1
1833 echo ${##1}
1835 echo $? = ${#?} .
1837 echo $? = ${#?} .
1851 #echo "D: !=$! #=$# \$=$$ -=$- ?=$?"
1852 echo >&3 3 = s^${!-word} , ${#-word} , p^${$-word} , f^${--word} , ${?-word} .
1853 echo >&3 4 = ${!+word} , ${#+word} , ${$+word} , ${-+word} , ${?+word} .
1854 echo >&3 5 = s^${!=word} , ${#=word} , p^${$=word} , f^${-=word} , ${?=word} .
1855 echo >&3 6 = s^${!?word} , ${#?word} , p^${$?word} , f^${-?word} , ${??word} .
1856 echo >&3 7 = sl^${#!} , ${##} , pl^${#$} , fl^${#-} , ${#?} .
1857 echo >&3 8 = sw^${%!} , ${%#} , pw^${%$} , fw^${%-} , ${%?} .
1858 echo >&3 9 = ${!!} , s^${!#} , ${!$} , s^${!-} , s^${!?} .
1859 echo >&3 10 = s^${!#pattern} , ${##pattern} , p^${$#pattern} , f^${-#pattern} , ${?#pattern} .
1860 echo >&3 11 = s^${!%pattern} , ${#%pattern} , p^${$%pattern} , f^${-%pattern} , ${?%pattern} .
1861 echo >&3 12 = $# : ${##} , ${##1} .
1863 echo >&3 14 = $# : ${##} , ${##1} .
1865 echo >&3 16 = $# : ${##} , ${##1} .
1867 echo >&3 18 = $# : ${##} , ${##1} .
1894 echo 1=${A#$B?}.
1896 echo 2=${1#$2?}.
1908 echo "<${a#~}> <${a#\~}> <${b:-~}> <${b:-\~}> <${c:=~}><$c> <${a/~}> <${a/x/~}> <${a/x/\~}>"
1916 echo ${!?}
1924 echo 1 $! .
1925 echo 2 ${!#} .
1926 echo 3 ${!#[0-9]} .
1927 echo 4 ${!-foo} .
1933 echo >&2 "cannot test, pid '$x' not numeric"
1934 echo >&2 report this with as many details as possible
1940 t=$!; [[ $t = $x ]]; echo 5 $? .
1941 t=${!#}; [[ $t = $x ]]; echo 6 $? .
1942 t=${!#[0-9]}; [[ $t = $y ]]; echo 7 $? .
1943 t=${!-foo}; [[ $t = $x ]]; echo 8 $? .
1944 t=${!?bar}; [[ $t = $x ]]; echo 9 $? .
1960 echo "1 ${12345678901234567890} ."
1971 echo 1 ${foo//n$((n++))/[$((++i))]} .
1972 echo 2 $n , $i .
1984 echo 1 ${foo@/n$((n++))/[$((++i))]} .
1985 echo 2 $n , $i .
1995 echo 1 ${foo@/n[12]/[$KSH_MATCH]} .
2005 echo @(a[b|)c]*
2017 echo [a*(]*)z
2028 echo +()c
2029 echo +()x
2030 echo +(*)c
2031 echo +(*)x
2044 echo $x
2052 echo 1: no-file+(a|b)stuff
2053 echo 2: no-file+(a*(c)|b)stuff
2054 echo 3: no-file+((((c)))|b)stuff
2067 echo 1: a+(b|c)d
2068 echo 2: a!(@(b|B))d
2069 echo 3: *(a(b|c)) # (...|...) can be used within X(..)
2070 echo 4: a[b*(foo|bar)]d # patterns not special inside [...]
2081 case foo in !(foo|bar)) echo yes;; *) echo no;; esac
2082 case bar in !(foo|bar)) echo yes;; *) echo no;; esac
2091 case foo in *(a|b[)) echo yes;; *) echo no;; esac
2092 case foo in *(a|b[)|f*) echo yes;; *) echo no;; esac
2093 case '*(a|b[)' in *(a|b[)) echo yes;; *) echo no;; esac
2094 case 'aab[b[ab[a' in *(a|b[)) echo yes;; *) echo no;; esac
2108 echo 1: ${x#a|abc}
2109 echo 2: ${x##a|abc}
2110 echo 3: ${x%def|f}
2111 echo 4: ${x%%f|def}
2123 echo 1: ${x#*(a|b)cd}
2124 echo 2: "${x#*(a|b)cd}"
2125 echo 3: ${x#"*(a|b)cd"}
2126 echo 4: ${x#a(b|c)}
2142 echo "<${x%bar|baz},${y%bar|baz},${z%\?}>"
2143 echo "<${x%ba(r|z)},${y%ba(r|z)}>"
2145 echo "<${x%bar|baz},${y%bar|baz},${z%\?}>"
2147 echo "<${z%(*}>"
2161 echo 1: ${x/2} . ${x/}
2162 echo 2: ${x//2}
2163 echo 3: ${x/+(2)}
2164 echo 4: ${x//+(2)}
2165 echo 5: ${x/2/4}
2166 echo 6: ${x//2/4}
2167 echo 7: ${x/+(2)/4}
2168 echo 8: ${x//+(2)/4}
2169 echo 9: ${x/b/c/e/f}
2170 echo 10: ${x/b\/c/e/f}
2171 echo 11: ${x/b\/c/e\/f}
2172 echo 12: ${x/b\/c/e\\/f}
2173 echo 13: ${x/b\\/c/e\\/f}
2174 echo 14: ${x//b/c/e/f}
2175 echo 15: ${x//b\/c/e/f}
2176 echo 16: ${x//b\/c/e\/f}
2177 echo 17: ${x//b\/c/e\\/f}
2178 echo 18: ${x//b\\/c/e\\/f}
2179 echo 19: ${x/b\/*\/c/x}
2180 echo 20: ${x/\//.}
2181 echo 21: ${x//\//.}
2182 echo 22: ${x///.}
2183 echo 23: ${x/#1/9}
2184 echo 24: ${x//#1/9}
2185 echo 25: ${x/%1/9}
2186 echo 26: ${x//%1/9}
2187 echo 27: ${x//\%1/9}
2188 echo 28: ${x//\\%1/9}
2189 echo 29: ${x//\a/9}
2190 echo 30: ${x//\\a/9}
2191 echo 31: ${x/2/$y}
2230 echo 1: ${foo/#/x}
2231 echo 2: ${foo/%/x}
2232 echo 3: ${foo/#/}
2233 echo 4: ${foo/#}
2234 echo 5: ${foo/%/}
2235 echo 6: ${foo/%}
2251 echo "${wd/#$pfx/~}"
2252 echo "${wd/#\$pfx/~}"
2253 echo "${wd/#"$pfx"/~}"
2254 echo "${wd/#'$pfx'/~}"
2255 echo "${wd/#"\$pfx"/~}"
2256 echo "${wd/#'\$pfx'/~}"
2272 echo "${wd/#$(echo /home/user)/~}"
2273 echo "${wd/#"$(echo /home/user)"/~}"
2274 echo "${wd/#'$(echo /home/user)'/~}"
2287 echo 1: ${wd/#$pfx/~}
2288 echo 2: ${wd/#\$pfx/~}
2289 echo 3: ${wd/#"$pfx"/~}
2290 echo 4: ${wd/#'$pfx'/~}
2291 echo 5: ${wd/#"\$pfx"/~}
2292 echo 6: ${wd/#'\$pfx'/~}
2297 echo 7: ${ts/a\/b/$tr}
2298 echo 8: ${ts/a\/b/\$tr}
2299 echo 9: ${ts/$tp/$tr}
2300 echo 10: ${ts/\$tp/$tr}
2301 echo 11: ${ts/\\$tp/$tr}
2302 echo 12: ${ts/$tp/c/d}
2303 echo 13: ${ts/$tp/c\/d}
2304 echo 14: ${ts/$tp/c\\/d}
2305 echo 15: ${ts/+(a\/b)/$tr}
2306 echo 16: ${ts/+(a\/b)/\$tr}
2307 echo 17: ${ts/+($tp)/$tr}
2308 echo 18: ${ts/+($tp)/c/d}
2309 echo 19: ${ts/+($tp)/c\/d}
2310 echo 20: ${ts//a\/b/$tr}
2311 echo 21: ${ts//a\/b/\$tr}
2312 echo 22: ${ts//$tp/$tr}
2313 echo 23: ${ts//$tp/c/d}
2314 echo 24: ${ts//$tp/c\/d}
2315 echo 25: ${ts//+(a\/b)/$tr}
2316 echo 26: ${ts//+(a\/b)/\$tr}
2317 echo 27: ${ts//+($tp)/$tr}
2318 echo 28: ${ts//+($tp)/c/d}
2319 echo 29: ${ts//+($tp)/c\/d}
2321 echo 30: ${ts/$tp/$tr}
2322 echo 31: ${ts//$tp/$tr}
2399 echo [*
2400 echo *[x
2401 echo [x/*
2404 echo a[a-z][*
2405 echo a[a-z]*
2406 echo a[a\-z]*
2426 echo d*/*
2427 echo d*/abc
2437 (cd 'a[b'; echo ok >'c]d')
2438 echo nok >abd
2439 echo fail >a/d
2459 echo [ab-]*
2460 echo [-ab]*
2461 echo [!-ab]*
2462 echo [!ab]*
2463 echo []ab]*
2464 echo [^ab]*
2465 echo [+--]*
2466 echo [--1]*
2484 echo [a--]*
2498 echo a[�-�]*
2507 echo [a.]*
2523 echo [a-c-e]*
2524 echo [a--@]*
2533 t() { [[ $1 = *[[:\<:]]bar[[:\>:]]* ]]; echo =$?; }
2650 th\`echo not-run\`ere
2651 th\\`echo is-run`ere
2660 th`echo not-run`ere
2693 echo done
2715 echo done
2736 tr abcdefghijklmnopqrstuvwxyz nopqrstuvwxyzabcdefghijklm <<<"$(echo "foo bar")"
2737 tr abcdefghijklmnopqrstuvwxyz nopqrstuvwxyzabcdefghijklm <<<"A $(echo "foo bar") B"
2788 echo $(tr r z <<<'bar' 2>/dev/null)
2820 echo blub
2876 echo blub
2934 echo blub
3034 echo "got $(cat) on stdin"
3035 echo "got $(cat <&4) on fd#4"
3036 echo "got $(cat <&5) on fd#5"
3050 [[ $x = "$y" ]]; echo $?
3077 echo ok
3089 echo = $text =
3100 echo = $unbalanced =
3111 echo = $balanced =
3122 echo = $balanced =
3131 XXX() { echo x-en; }
3132 YYY() { echo y-es; }
3134 prefix A <<XXX && echo "$(prefix B <<XXX
3135 echo line 1
3137 echo line 2)" && prefix C <<YYY
3138 echo line 3
3140 echo line 4)"
3141 echo line 5
3145 A:echo line 3
3146 B:echo line 1
3148 C:echo line 4)"
3149 C:echo line 5
3159 echo "3<$x>"
3167 echo "7<$y>"
3181 echo end
3194 echo end
3206 echo end
3221 echo end
3234 echo end
3248 echo end
3262 echo end
3285 echo Left overs: *
3308 echo Left overs: *
3337 echo Left overs: *
3356 echo Left overs: *
3370 echo A
3374 echo B
3378 echo Left overs: *
3397 echo Left overs: *
3414 echo Left overs: *
3442 echo Left overs: *
3457 x " \" \ \\ $ \$ `echo baz` \`echo baz\` $foo \$foo x
3460 x " \" \ \\ $ \$ `echo baz` \`echo baz\` $foo \$foo x
3469 x " \" \ \\ $ \$ `echo baz` \`echo baz\` $foo \$foo x
3472 x " \" \ \ $ $ baz `echo baz` bar $foo x
3479 echo ${foo:+'blah $foo'}
3489 echo "${foo:+'blah $foo'}"
3499 echo "$( echo ${foo:+'blah $foo'})"
3508 echo ${foo%'2'*} "${foo%'2'*}" ${foo%2'*'} "${foo%2'*'}"
3530 echo ${foo:+${foo:+'blah $foo'}}
3540 echo "${foo:+${foo:+'blah $foo'}}"
3550 echo "$( echo ${foo:+${foo:+'blah $foo'}})"
3559 echo ${foo:+${foo%'2'*}} "${foo:+${foo%'2'*}}" ${foo:+${foo%2'*'}} "${foo:+${foo%2'*'}}"
3603 echo hi
3607 1 echo hi
3620 echo hi
3621 echo yo
3622 echo hi
3628 1 echo hi
3646 echo hi
3651 1 echo hi
3695 echo hi
3696 echo there
3703 /^X*echo there\nX*$/
3716 echo hi
3717 echo there
3720 /X*hi\nX*there\nX*echo there\nthere\nX*/
3736 echo ok
3751 echo abc
3752 fc -e - | (read x; echo "A $x")
3753 echo ok
3759 /^X*echo abc\nX*/
3770 echo abc def
3771 echo ghi jkl
3773 fc -e - echo
3779 2 echo ghi jkl
3781 4 echo ghi jkl
3784 /^X*echo ghi jkl\nX*$/
3796 echo line 1
3797 echo line 2
3798 echo line 3
3804 2 echo line 2
3805 3 echo line 3
3820 echo line 1
3821 echo line 2
3822 echo line 3
3828 1 echo line 1
3829 2 echo line 2
3830 3 echo line 3
3843 echo line 1
3844 echo line 2
3845 echo line 3
3846 echo line 4
3853 2 echo line 2
3854 3 echo line 3
3867 echo line 1
3868 echo line 2
3869 echo line 3
3870 echo line 4
3877 4 echo line 4
3890 echo line 1
3891 echo line 2
3892 echo line 3
3893 echo line 4
3901 4 echo line 4
3902 4 echo line 4
3917 echo line 1
3918 echo line 2
3919 echo line 3
3920 echo line 4
3921 echo line 5
3929 4 echo line 4
3930 5 echo line 5
3943 echo line 1
3944 echo line 2
3945 echo line 3
3946 echo line 4
3947 echo line 5
3955 4 echo line 4
3956 5 echo line 5
3970 echo line 1
3971 echo line 2
3972 echo line 3
3973 echo line 4
3974 echo line 5
3982 4 echo line 4
3983 3 echo line 3
3984 2 echo line 2
3997 echo line 1
3998 echo line 2
3999 echo line 3
4000 echo line 4
4001 echo line 5
4009 4 echo line 4
4010 3 echo line 3
4011 2 echo line 2
4024 echo line 1
4025 echo line 2
4026 echo line 3
4027 echo line 4
4028 echo line 5
4036 2 echo line 2
4037 3 echo line 3
4038 4 echo line 4
4051 echo abc def
4052 echo ghi jkl
4053 fc -e - abc=AB 'echo a'
4059 /^X*echo AB def\nX*$/
4070 echo abc def
4071 echo ghi jkl
4072 fc -e - jkl=XYZQRT 'echo g'
4078 /^X*echo ghi XYZQRT\nX*$/
4089 echo abc def
4090 echo ghi jkl
4097 /^X*echo ghi XYZQRT\nX*$/
4109 echo abc def asjj sadjhasdjh asdjhasd
4115 /^X*echo FooBARbc def FooBARsjj sFooBARdjhFooBARsdjh FooBARsdjhFooBARsd\nX*$/
4127 echo abc def
4128 echo ghi jkl
4135 /^X*echo AB def\nX*$/
4150 echo abc def
4151 fc echo
4161 /^X*echo FOOBAR def\nX*$/
4174 echo line 1
4175 echo line 2 is here
4176 echo line 3
4177 echo line 4
4191 /^X*echo line 2 is changed\nX*$/
4206 echo abc def
4207 fc echo
4210 echo a new line
4221 1 echo abc def
4222 2 echo FOOBAR def
4223 echo a new line
4225 /^X*echo FOOBAR def\necho a new line\nX*$/
4239 echo abc def
4240 fc echo
4261 echo line 1
4262 echo line 2 is here
4263 echo line 3
4264 echo line 4
4290 echo abc def
4291 fc echo
4294 echo a new line
4303 1 echo abc def
4304 2 echo FOOBAR def
4305 echo a new line
4313 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 .; }
4346 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4363 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4383 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4394 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4406 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4417 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4420 echo -n '1:'; for i in $x ; do echo -n " [$i]" ; done ; echo
4421 echo -n '2:'; for i in :b:: ; do echo -n " [$i]" ; done ; echo
4425 echo -n '5:'; for i in $x ; do echo -n " [$i]" ; done ; echo
4428 echo -n '7:'; for i in $x ; do echo -n " [$i]" ; done ; echo
4430 echo -n '9:'; for i in ${FOO-`echo -n h:i`th:ere} ; do echo -n " [$i]" ; done ; echo
4431 showargs 10 ${FOO-`echo -n h:i`th:ere}
4432 showargs 11 "${FOO-`echo -n h:i`th:ere}"
4434 echo -n '12:'; for i in $x ; do echo -n " [$i]" ; done ; echo
4455 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4466 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4481 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4513 [ "$q" = "$nq" ] && echo =true || echo =false
4537 [ "$q" = "$nq" ] && echo =true || echo =false
4791 echo '=a1zns'
4794 echo '=a2zqs'
4797 echo '=a3zna'
4800 echo '=a4zqa'
4803 echo '=a5ins'
4806 echo '=a6iqs'
4809 echo '=a7ina'
4812 echo '=a8iqa'
4815 echo '=b1zns'
4818 echo '=b2zqs'
4821 echo '=b3zna'
4824 echo '=b4zqa'
4827 echo '=b5ins'
4830 echo '=b6iqs'
4833 echo '=b7ina'
4836 echo '=b8iqa'
4915 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4927 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4939 n() { echo "$#"; }; n "${foo-$@}"
4947 "$__progname" -c 'IFS=; set a b; [[ $* = "$1$2" ]]; echo 1 $?' sh a b
4948 "$__progname" -c 'IFS=; [[ $* = ab ]]; echo 2 "$?"' sh a b
4949 "$__progname" -c 'IFS=; [[ "$*" = ab ]]; echo 3 "$?"' sh a b
4950 "$__progname" -c 'IFS=; [[ $* = a ]]; echo 4 "$?"' sh a b
4951 "$__progname" -c 'IFS=; [[ "$*" = a ]]; echo 5 "$?"' sh a b
4952 "$__progname" -c 'IFS=; [[ "$@" = a ]]; echo 6 "$?"' sh a b
4953 "$__progname" -c 'IFS=; case "$@" in a) echo 7 a;; ab) echo 7 b;; a\ b) echo 7 ok;; esac' sh a b
4954 "$__progname" -c 'IFS=; case $* in a) echo 8 a;; ab) echo 8 ok;; esac' sh a b
4971 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
4978 echo "var=$var"
4990 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
5004 echo $i
5017 echo $i
5032 echo $a
5035 echo $a
5060 echo $i
5069 echo $i
5070 echo ---------- A
5072 echo $j
5073 echo ---------- B
5076 echo $k
5077 echo ---------- C
5080 echo $l
5081 echo ---------- D
5084 echo $m
5085 echo ---------- E
5088 echo $n
5090 echo $n
5091 echo ---------- F
5094 echo $o
5095 echo ---------- G
5098 echo $p
5123 echo $aa
5126 echo $bb
5129 echo $bb
5132 echo $cc
5150 echo $a
5159 echo $a
5160 echo --
5163 echo $j
5164 echo --
5167 echo $k
5168 echo --
5170 for l in 1 2+3 4; do echo $l; done
5189 echo $i
5197 echo $(( zz = 8#100 ))
5198 echo $zz
5207 echo 1:$((36#109AZ)).
5209 echo 2:$x.
5211 echo 3:$x.
5223 echo 1 "$("$__progname" -c 'echo :$((10))/$((010)),$((0x10)):')" .
5224 echo 2 "$("$__progname" -o posix -c 'echo :$((10))/$((010)),$((0x10)):')" .
5225 echo 3 "$("$__progname" -o sh -c 'echo :$((10))/$((010)),$((0x10)):')" .
5236 echo 1:$((1#1))0.
5245 echo 1:$((1#1))0.
5255 eval 'echo '$i':$(('$i'#10)).'
5257 echo 37:$($__progname -c 'echo $((37#10))').$?:
5374 echo s:$((2147483647+1)).$(((2147483647*2)+1)).$(((2147483647*2)+2)).
5375 echo u:$((#2147483647+1)).$((#(2147483647*2)+1)).$((#(2147483647*2)+2)).
5385 echo s:$((9223372036854775807+1)).$(((9223372036854775807*2)+1)).$(((9223372036854775807*2)+2)).
5386 echo u:$((#9223372036854775807+1)).$((#(9223372036854775807*2)+1)).$((#(9223372036854775807*2)+2)).
5402 echo A $LINENO
5403 echo B $LINENO
5405 echo C $LINENO
5415 echo dot A $LINENO
5416 echo dot B $LINENO
5418 echo dot C $LINENO
5420 echo A $LINENO
5421 echo B $LINENO
5434 echo A $LINENO
5435 echo B $LINENO
5437 echo func A $LINENO
5438 echo func B $LINENO
5441 echo C $LINENO
5453 echo dot A $LINENO
5454 echo dot B $LINENO
5457 echo A $LINENO
5458 echo B $LINENO
5460 echo func A $LINENO
5461 echo func B $LINENO
5465 echo C $LINENO
5480 echo dot A $LINENO
5481 echo dot B $LINENO
5485 echo A $LINENO
5486 echo B $LINENO
5488 echo func A $LINENO
5489 echo func B $LINENO
5493 echo C $LINENO
5508 echo "line <$1>"
5521 ${ZSH_VERSION+false} || emulate sh; echo $LINENO
5522 echo $LINENO
5523 eval ' echo $LINENO
5524 echo $LINENO
5525 echo $LINENO'
5526 echo $LINENO
5540 trap "echo trap 1 executed" UNKNOWNSIGNAL || echo "foo"
5541 echo =1
5542 trap "echo trap 2 executed" UNKNOWNSIGNAL EXIT 999999 FNORD
5543 echo = $?
5559 echo "A B " > IN
5562 echo 1: "x[$x] y[$y] z[$z]"
5563 echo 1a: ${z-z not set}
5565 echo 2: "x[$x]"
5635 echo "abc" > IN
5637 echo "[$REPLY]";
5653 echo "<$a|$b|$c><$d>"
5713 echo foo[
5715 echo "hi[ $n ]=1"
5724 $ echo echo hi > /tmp/q ; chmod a+rx /tmp/q
5739 # Need to restore path so echo can be found (some shells don't have
5742 echo hi
5757 $ ksh -c 'echo $(echo \( )'
5759 $ ksh -c 'echo $(echo "(" )'
5768 echo $(echo \( )
5769 echo $(echo "(" )
5781 echo $i
5789 echo 'continue in for loop broken'
5796 echo bye
5804 echo $?
5814 echo -n "FPOSIX=$FPOSIX FSH=$FSH "
5819 echo rv=$?
5823 echo rv=$?
5827 echo rv=$?
5831 echo rv=$?
5842 echo $?
5851 echo -n "FPOSIX=$FPOSIX FSH=$FSH "
5856 echo rv=$?
5860 echo rv=$?
5864 echo rv=$?
5868 echo rv=$?
5879 echo ${x##*/}
5880 should echo blah but on some machines echos /foo/bar/blah.
5883 echo ${x##*/}
5892 echo "`echo \"$x\"`"
5893 echo "`echo "$x"`"
5897 echo "`echo \"$x\"`"
5898 echo "`echo "$x"`"
5916 echo A line of text that will be duplicated quite a number of times.> t1
5949 echo 1: $?
5950 echo 2: $(whence does/not/exist | wc -l)
5951 echo 3: $(whence does/not/exist cat | wc -l)
5962 $ echo $line
5964 $ echo ${line%%:*}
5966 $ echo $line
5969 change the value of line. On sun4s & pas, the echo ${line%%:*} doesn't
5974 echo ${x%%:*}
5975 echo $x
5997 $ echo ${x%/*}
5999 $ echo "${x%/*}"
6003 echo "${x%/*}"
6012 -\?) echo hi
6017 -\\?) echo hi
6023 -\?) echo fail
6029 $ echo `echo hi \`echo there\` folks`
6030 asks for more info. sh and AT&T ksh88 both echo
6033 echo `echo hi \`echo there\` folks`
6040 $ (echo hi ; (echo there ; echo folks))
6044 $ (echo hi ; (echo there ; echo folks))
6050 ( : ; ( : ; echo hi))
6060 (echo a; echo b) | while read x ; do
6061 echo $x
6079 echo $last
6093 echo hi
6101 a.x=1 echo hi
6110 a b hi ; do echo $i ; done
6118 echo ${a{b}}
6132 echo "[$x]"
6133 echo $ret
6151 echo 1: ${x-x not set} ${y-y not set} ${z-z not set}
6152 echo 2: ${x:+x not null} ${y:+y not null} ${z:+z not null}
6201 (echo abcdef; echo; echo 123) |
6205 c=`echo $line | wc -c`
6206 echo $c
6226 if false; then echo hi ; fi
6229 while false; do echo hi; done
6230 echo ok
6241 echo `false; echo hi` $(<this-file-does-not-exist)
6242 echo $?
6253 echo hi
6262 echo bar`
6263 echo "($foo)"
6296 echo "<$FOO>"
6297 echo "<$BAR>"
6298 echo "<$MORE>"
6299 echo "<$JUNK>"
6311 alias x='echo hi'
6313 echo "[$FOO]"
6323 alias x='echo hi;
6324 echo there'
6326 echo done
6344 echo "done ($?)"
6346 echo=echo; [ -x /bin/echo ] && echo=/bin/echo
6347 exec $echo subtest-1 hi
6349 echo subtest-1 foo/*
6351 echo=echo; [ -x /bin/echo ] && echo=/bin/echo
6352 sed 's/^/X /' << E_O_F; exec $echo subtest-2 hi
6358 echo subtest-2 foo/*
6374 echo X$FOO
6396 alias foo='echo hi ; '
6398 foo echo there
6412 echo A: $*, *
6428 echo mark 1
6430 echo mark 2
6444 echo bfunc: enter "(args: $*; OPTIND=$OPTIND)"
6448 echo bfunc: B option
6451 echo bfunc: odd option "($oc)"
6455 echo bfunc: leave
6459 echo kfunc: enter "(args: $*; OPTIND=$OPTIND)"
6463 echo kfunc: K option
6466 echo bfunc: odd option "($oc)"
6470 echo kfunc: leave
6474 echo "line 1: OPTIND=$OPTIND"
6476 echo "line 2: ret=$?, optc=$optc, OPTIND=$OPTIND"
6478 echo "line 3: OPTIND=$OPTIND"
6480 echo "line 4: ret=$?, optc=$optc, OPTIND=$OPTIND"
6482 echo "line 5: OPTIND=$OPTIND"
6484 echo "line 6: ret=$?, optc=$optc, OPTIND=$OPTIND"
6485 echo
6489 echo "line 10: OPTIND=$OPTIND"
6491 echo "line 20: ret=$?, optc=$optc, OPTIND=$OPTIND"
6493 echo "line 30: OPTIND=$OPTIND"
6495 echo "line 40: ret=$?, optc=$optc, OPTIND=$OPTIND"
6497 echo "line 50: OPTIND=$OPTIND"
6499 echo "line 60: ret=$?, optc=$optc, OPTIND=$OPTIND"
6538 echo ok dparen
6541 echo ok dbrackets
6552 echo 1 ${x%X*}
6553 echo 2 ${x:%X*}
6554 echo 3 ${x%%X*}
6555 echo 4 ${x:%%X*}
6556 echo 5 ${x#*X}
6557 echo 6 ${x:#*X}
6558 echo 7 ${x##*X}
6559 echo 8 ${x:##*X}
6576 echo A
6578 echo B
6582 echo M
6584 echo N
6601 trap 'echo hi' exit
6612 echo ${#a[*]}
6621 echo A $?
6623 echo B $?
6625 echo C $?
6635 trap 'echo parent exit' EXIT
6636 echo start
6637 (echo A; echo A last)
6638 echo B
6639 (echo C; trap 'echo sub exit' EXIT; echo C last)
6640 echo parent last
6657 test a -nt b && echo nt OK || echo nt BAD
6658 test b -ot a && echo ot OK || echo ot BAD
6668 echo FNORD-0
6680 echo FNORD-1
6682 echo FNORD-2
6684 echo FNORD-3
6686 echo FNORD-4
6688 echo FNORD-5
6690 echo FNORD-6
6692 echo FNORD-7
6694 echo FNORD-8
6698 echo FNORD-9
6773 echo blub |&
6775 echo ok
6813 echo 1 $(( a = 5 )) .
6814 echo 2 $(( ++a )) , $(( a++ )) , $(( a )) .
6815 echo 3 $(( --a )) , $(( a-- )) , $(( a )) .
6816 echo 4 $(( a == 5 )) , $(( a == 6 )) .
6817 echo 5 $(( a != 5 )) , $(( a != 6 )) .
6818 echo 6 $(( a *= 3 )) .
6819 echo 7 $(( a /= 5 )) .
6820 echo 8 $(( a %= 2 )) .
6821 echo 9 $(( a += 9 )) .
6822 echo 10 $(( a -= 4 )) .
6823 echo 11 $(( a <<= 1 )) .
6824 echo 12 $(( a >>= 1 )) .
6825 echo 13 $(( a &= 4 )) .
6826 echo 14 $(( a ^= a )) .
6827 echo 15 $(( a |= 5 )) .
6828 echo 16 $(( 5 << 1 )) .
6829 echo 17 $(( 5 >> 1 )) .
6830 echo 18 $(( 5 <= 6 )) , $(( 5 <= 5 )) , $(( 5 <= 4 )) .
6831 echo 19 $(( 5 >= 6 )) , $(( 5 >= 5 )) , $(( 5 >= 4 )) .
6832 echo 20 $(( 5 < 6 )) , $(( 5 < 5 )) , $(( 5 < 4 )) .
6833 echo 21 $(( 5 > 6 )) , $(( 5 > 5 )) , $(( 5 > 4 )) .
6834 echo 22 $(( 0 && 0 )) , $(( 0 && 1 )) , $(( 1 && 0 )) , $(( 1 && 1 )) .
6835 echo 23 $(( 0 || 0 )) , $(( 0 || 1 )) , $(( 1 || 0 )) , $(( 1 || 1 )) .
6836 echo 24 $(( 5 * 3 )) .
6837 echo 25 $(( 7 / 2 )) .
6838 echo 26 $(( 5 % 5 )) , $(( 5 % 4 )) , $(( 5 % 1 )) , $(( 5 % -1 )) , $(( 5 % -2 )) .
6839 echo 27 $(( 5 + 2 )) , $(( 5 + 0 )) , $(( 5 + -2 )) .
6840 echo 28 $(( 5 - 2 )) , $(( 5 - 0 )) , $(( 5 - -2 )) .
6841 echo 29 $(( 6 & 4 )) , $(( 6 & 8 )) .
6842 echo 30 $(( 4 ^ 2 )) , $(( 4 ^ 4 )) .
6843 echo 31 $(( 4 | 2 )) , $(( 4 | 4 )) , $(( 4 | 0 )) .
6844 echo 32 $(( 0 ? 1 : 2 )) , $(( 3 ? 4 : 5 )) .
6845 echo 33 $(( 5 , 2 , 3 )) .
6846 echo 34 $(( ~0 )) , $(( ~1 )) , $(( ~~1 )) , $(( ~~2 )) .
6847 echo 35 $(( !0 )) , $(( !1 )) , $(( !!1 )) , $(( !!2 )) .
6848 echo 36 $(( (5) )) .
6893 echo 1 $(( a ^<= 1 )) , $(( b ^<= 1 )) .
6894 echo 2 $(( a ^>= 2 )) , $(( b ^>= 2 )) .
6895 echo 3 $(( 5 ^< 1 )) .
6896 echo 4 $(( 5 ^> 1 )) .
6922 "$__progname" -c 'u=x; echo $? $u .' || echo aborted, $?
6923 echo =
6924 "$__progname" -c 'readonly u; u=x; echo $? $u .' || echo aborted, $?
6925 echo =
6926 "$__progname" -c 'u=x; readonly u; unset u; echo $? $u .' || echo aborted, $?
6940 "$__progname" -c 'readonly foo; export foo=a; echo $?' || echo aborted, $?
6950 …"$__progname" -c 'set -- -a b; getopts a c; echo $? $c .; getopts a c; echo $? $c .' || echo abort…
6959 "$__progname" -c 'readonly c; set -- -a b; getopts a c; echo $? $c .' || echo aborted, $?
6969 echo x | "$__progname" -c 'read s; echo $? $s .' || echo aborted, $?
6970 echo y | "$__progname" -c 'readonly s; read s; echo $? $s .' || echo aborted, $?
7010 echo ${ab\
7044 echo $BAR
7054 X=a Y=b; X=$Y Y=$X "$__progname" -c 'echo 1 $X $Y .'; echo 2 $X $Y .
7056 X=a Y=${X=b} Z=$X "$__progname" -c 'echo 3 $Z .'
7058 X=a Y=${X=b} Z=$X; echo 4 $Z .
7071 X=a Y=b; X=$Y Y=$X; echo 1 $X $Y .
7083 Z=a Y=${X:=b} sh -c 'echo +$X+ +$Y+ +$Z+'
7084 echo /$X/
7087 X= Y=${X:=b} sh -c 'echo +$X+ +$Y+'
7088 echo /$X/
7123 f() { a=2; }; g() { b=3; echo y$c-; }; a=1 f; b=2; c=1 g
7124 echo x$a-$b- z$c-
7173 echo "${foo:-"a"}*"
7180 echo ${foo#a c}
7188 echo ${x#$*}
7194 echo ${:}
7202 echo ${*:0}
7210 echo ${foo[*]:0}
7220 echo "<$*> X${*:+ }X"
7256 echo ${A[x=(i+=1)]#${A[y=(i+=2)]}}
7257 echo $x $y
7269 echo 1=$i
7273 echo 2=$i
7277 echo 3=$i
7281 echo 4=$i
7293 echo ${foo[*]}
7295 echo ${foo[*]}
7305 exec echo hi
7306 echo still herre
7324 echo loop1=$?
7334 echo loop2=$?
7341 echo loop3=$?
7354 echo $?
7357 echo $?
7370 echo blank: $?
7373 (echo subshell: $?)
7375 echo 'echo include: $?' > foo
7379 trap 'echo trap: $?' ERR
7381 echo exit: $?
7394 echo x >a/b
7395 test -e a/b; echo 1e $? .
7396 test -f a/b; echo 1f $? .
7398 test -e a/b; echo 2e $? .
7399 test -f a/b; echo 2f $? .
7401 test -e a/b; echo 3e $? .
7402 test -f a/b; echo 3f $? .
7415 echo `echo [�`
7427 echo x${foo?$x}
7438 echo RETVAL: $rv
7442 doit 'echo ${1x}'
7443 doit 'echo "${1x}"'
7444 doit 'echo ${1?}'
7445 doit 'echo ${19?}'
7446 doit 'echo ${!:?}'
7447 doit -u 'echo ${*:?}' foo ""
7467 arguments: !-c!echo "[$-]"!
7475 echo ${A=a=}~ b=~ c=d~ ~
7478 echo ". $e . $f ."
7479 echo ". $g . $h ."
7482 echo ${A=a=}~ b=~ c=d~ ~
7485 echo ". $e . $f ."
7486 echo ". $g . $h ."
7504 echo "<$c>" "<$d>"
7510 [[ $plus = / ]]; echo one $? .
7511 [[ $minus = "$wd" ]]; echo two $? .
7512 [[ $nix = /sweet ]]; echo nix $? .
7523 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
7559 command echo 10 ksh a=~
7564 command echo 12 posix a=~
7571 echo 'echo "<$foo>"' >bar
7588 echo "20 some arbitrary stuff "=~
7590 echo "21 some arbitrary stuff "=~
7623 env false && echo something
7624 echo END
7629 + echo END
7642 env false && echo something
7644 echo END
7650 + echo END
7658 trap 'echo EXIT' EXIT
7659 trap 'echo ERR' ERR
7662 echo DONE
7674 echo pre
7676 false && echo foo
7678 echo bar
7696 echo $x
7698 echo pre
7700 echo post
7712 print 'all:\n\t@echo eins\n\t@exit 42\n' >zd/a/Makefile
7713 print 'all:\n\t@echo zwei\n' >zd/b/Makefile
7716 …en echo "($_nextdir_ skipped)"; break; fi; subskipdir="$subskipdir ${subentry#/}"; fi; done;…
7732 echo x
7734 echo y$?
7757 echo 1 ok
7759 echo 2 wrong
7769 (echo; echo :) >x
7770 "$__progname" ./x >/dev/null 2>&1; r=$?; echo $((i++)) $r .
7771 "$__progname" -c ./x >/dev/null 2>&1; r=$?; echo $((i++)) $r .
7772 echo exit 42 >x
7773 "$__progname" ./x >/dev/null 2>&1; r=$?; echo $((i++)) $r .
7774 "$__progname" -c ./x >/dev/null 2>&1; r=$?; echo $((i++)) $r .
7776 "$__progname" ./x >/dev/null 2>&1; r=$?; echo $((i++)) $r .
7777 "$__progname" -c ./x >/dev/null 2>&1; r=$?; echo $((i++)) $r .
7792 echo A $?
7795 echo B $?
7798 echo C $?
7801 echo D $?
7804 echo E $?
7807 eval $(echo :; false)
7808 echo F $?
7809 echo -n "G "
7811 eval 'echo $?'
7812 echo H $?
7827 trap 'echo hi; exit' EXIT
7842 trap 'echo EXtrap' EXIT
7843 trap 'echo ERtrap' ERR
7845 echo "and run $2"
7847 echo and out
7850 trap 'echo EXtrap' EXIT
7851 trap 'echo ERtrap' ERR
7853 echo 'and run true'
7855 echo and out
7858 trap 'echo EXtrap' EXIT
7859 trap 'echo ERtrap' ERR
7861 echo 'and run false'
7863 echo and out
7866 trap 'echo EXtrap' EXIT
7867 trap 'echo ERtrap' ERR
7869 echo 'and run ${v?}'
7871 echo and out
7877 echo $? >rc
7884 echo : $xe
7886 echo = eval-true $(<rc) .
7888 echo = eval-false $(<rc) .
7890 echo = eval-undef $(<rc) .
7892 echo = noeval-true $(<rc) .
7894 echo = noeval-false $(<rc) .
7896 echo = noeval-undef $(<rc) .
7898 echo : $xe
7900 echo = eval-true $(<rc) .
7902 echo = eval-false $(<rc) .
7904 echo = eval-undef $(<rc) .
7906 echo = noeval-true $(<rc) .
7908 echo = noeval-false $(<rc) .
7910 echo = noeval-undef $(<rc) .
7972 trap -- "echo $1 >&2" EXIT
7976 $(trap -- "echo comsub_exit >&2" EXIT)
7977 (trap -- "echo subshell_exit >&2" EXIT)
7990 echo Syntax error <
7991 echo 'After error 1'
7992 trap 'echo Exit trap' EXIT
7993 echo Syntax error <
7994 echo 'After error 2'
7995 trap 'echo Exit trap' EXIT
7997 echo 'After exit'
8009 test 2005/10/08 '<' 2005/08/21 && echo ja || echo nein
8010 test 2005/08/21 \< 2005/10/08 && echo ja || echo nein
8011 test 2005/10/08 '>' 2005/08/21 && echo ja || echo nein
8012 test 2005/08/21 \> 2005/10/08 && echo ja || echo nein
8022 Check a weird precedence case (and POSIX echo)
8026 echo $rv
8035 test -o $1; echo $?
8036 [ -o $1 ]; echo $?
8037 [[ -o $1 ]]; echo $?
8040 test -o $1 -o -o !$1; echo $?
8041 [ -o $1 -o -o !$1 ]; echo $?
8042 [[ -o $1 || -o !$1 ]]; echo $?
8043 test -o ?$1; echo $?
8045 echo 0y $(if_test utf8-mode) =
8046 echo 0n $(if_test utf8-hack) =
8047 echo 1= $(runtest utf8-hack) =
8048 echo 2= $(runtest !utf8-hack) =
8049 echo 3= $(runtest ?utf8-hack) =
8051 echo 1+ $(runtest utf8-mode) =
8052 echo 2+ $(runtest !utf8-mode) =
8053 echo 3+ $(runtest ?utf8-mode) =
8055 echo 1- $(runtest utf8-mode) =
8056 echo 2- $(runtest !utf8-mode) =
8057 echo 3- $(runtest ?utf8-mode) =
8058 echo = short flags =
8059 echo 0y $(if_test -U) =
8060 echo 0y $(if_test +U) =
8061 echo 0n $(if_test -_) =
8062 echo 0n $(if_test -U-) =
8063 echo 1= $(runtest -_) =
8064 echo 2= $(runtest !-_) =
8065 echo 3= $(runtest ?-_) =
8067 echo 1+ $(runtest -U) =
8068 echo 2+ $(runtest !-U) =
8069 echo 3+ $(runtest ?-U) =
8070 echo 1+ $(runtest +U) =
8071 echo 2+ $(runtest !+U) =
8072 echo 3+ $(runtest ?+U) =
8074 echo 1- $(runtest -U) =
8075 echo 2- $(runtest !-U) =
8076 echo 3- $(runtest ?-U) =
8077 echo 1- $(runtest +U) =
8078 echo 2- $(runtest !+U) =
8079 echo 3- $(runtest ?+U) =
8118 rv=$?; echo $((++i)) $rv
8121 rv=$?; echo $((++i)) $rv
8124 rv=$?; echo $((++i)) $rv
8127 rv=$?; echo $((++i)) $rv
8130 rv=$?; echo $((++i)) $rv
8133 rv=$?; echo $((++i)) $rv
8136 rv=$?; echo $((++i)) $rv
8138 rv=$?; echo $((++i)) $rv
8140 rv=$?; echo $((++i)) $rv
8142 rv=$?; echo $((++i)) $rv
8160 echo ok
8171 rv=$?; echo $((++i)) $rv
8173 rv=$?; echo $((++i)) $rv
8175 rv=$?; echo $((++i)) $rv
8177 rv=$?; echo $((++i)) $rv
8180 rv=$?; echo $((++i)) $rv
8182 rv=$?; echo $((++i)) $rv
8184 rv=$?; echo $((++i)) $rv
8186 rv=$?; echo $((++i)) $rv
8189 rv=$?; echo $((++i)) $rv
8191 rv=$?; echo $((++i)) $rv
8193 rv=$?; echo $((++i)) $rv
8195 rv=$?; echo $((++i)) $rv
8216 rv=$?; echo $((++i)) $rv
8218 rv=$?; echo $((++i)) $rv
8220 rv=$?; echo $((++i)) $rv
8222 rv=$?; echo $((++i)) $rv
8225 rv=$?; echo $((++i)) $rv
8227 rv=$?; echo $((++i)) $rv
8229 rv=$?; echo $((++i)) $rv
8231 rv=$?; echo $((++i)) $rv
8234 rv=$?; echo $((++i)) $rv
8236 rv=$?; echo $((++i)) $rv
8238 rv=$?; echo $((++i)) $rv
8240 rv=$?; echo $((++i)) $rv
8262 (0) echo yepp 0 \#"$*" ;;
8263 (1) echo nope 1 \#"$*" ;;
8264 (2) echo terr 2 \#"$*" ;;
8265 (*) echo wtf\? $? \#"$*" ;;
8295 echo x $FNORD
8307 echo x $FNORD
8321 echo x $FNORD
8335 echo x $FNORD
8346 [[ $(set +o) == *@(-o sh)@(| *) ]] && echo sh || echo nosh
8347 [[ $(set +o) == *@(-o braceexpand)@(| *) ]] && echo brex || echo nobrex
8348 echo {a,b,c}
8350 echo {a,b,c}
8352 echo {a,b,c}
8354 echo {a,b,c}
8355 [[ $(set +o) == *@(-o sh)@(| *) ]] && echo sh || echo nosh
8356 [[ $(set +o) == *@(-o braceexpand)@(| *) ]] && echo brex || echo nobrex
8358 echo {a,b,c}
8359 [[ $(set +o) == *@(-o sh)@(| *) ]] && echo sh || echo nosh
8360 [[ $(set +o) == *@(-o braceexpand)@(| *) ]] && echo brex || echo nobrex
8385 '[[ $(set +o) == *"-o "@(sh|posix)@(| *) ]] && echo sh || echo nosh')
8404 '[[ $(set +o) == *"-o "@(sh|posix)@(| *) ]] && echo sh || echo nosh')
8419 echo *
8420 echo a | while read d; do
8421 echo $d
8422 echo $d*
8423 echo *
8425 echo $d*
8426 echo *
8428 echo *
8443 "$__progname" -c 'i=100; echo hi |& while read -p line; do echo "$((i++)) $line"; done'
8444 "$__progname" -c 'i=200; echo hi | cat |& while read -p line; do echo "$((i++)) $line"; done'
8445 "$__progname" -c 'i=300; (echo hi | cat) |& while read -p line; do echo "$((i++)) $line"; done'
8455 echo 1 $PIPESTATUS .
8456 echo 2 ${PIPESTATUS[0]} .
8457 echo 3 ${PIPESTATUS[1]} .
8458 (echo x; exit 12) | (cat; exit 23) | (cat; exit 42)
8459echo 5 $? , $PIPESTATUS , ${PIPESTATUS[0]} , ${PIPESTATUS[1]} , ${PIPESTATUS[2]} , ${PIPESTATUS[3]…
8460 echo 6 ${PIPESTATUS[0]} .
8462 echo 8 $(set | fgrep PIPESTATUS) .
8477 echo 1 "$("$__progname" -c '(exit 12) | (exit 23) | (exit 42); echo $?')" .
8478 echo 2 "$("$__progname" -c '! (exit 12) | (exit 23) | (exit 42); echo $?')" .
8479 echo 3 "$("$__progname" -o pipefail -c '(exit 12) | (exit 23) | (exit 42); echo $?')" .
8480 echo 4 "$("$__progname" -o pipefail -c '! (exit 12) | (exit 23) | (exit 42); echo $?')" .
8481 echo 5 "$("$__progname" -c '(exit 23) | (exit 42) | :; echo $?')" .
8482 echo 6 "$("$__progname" -c '! (exit 23) | (exit 42) | :; echo $?')" .
8483 echo 7 "$("$__progname" -o pipefail -c '(exit 23) | (exit 42) | :; echo $?')" .
8484 echo 8 "$("$__progname" -o pipefail -c '! (exit 23) | (exit 42) | :; echo $?')" .
8485 echo 9 "$("$__progname" -o pipefail -c 'x=$( (exit 23) | (exit 42) | :); echo $?')" .
8521 echo before ${arrfoo[0]} .
8523 echo after ${arrfoo[0]} .
8526 echo inside before ${arrbar[0]} .
8528 echo inside changed ${arrbar[0]} .
8530 echo inside typeset ${arrbar[0]} .
8532 echo inside changed ${arrbar[0]} .
8534 echo before ${arrbar[0]} .
8536 echo after ${arrbar[0]} .
8552 echo =
8554 echo =
8574 echo "<$ln> <$rn> <$lz> <$rz> <$rx>"
8588 echo "<$ln> <$rn> <$zn> <$ls> <$rs> <$zs>"
8626 echo got ${#anzahl[*]} files
8630 echo =
8632 echo =
8634 echo =
8636 echo =
8638 echo =
8639 "$__progname" -c 'echo : $(fnord)'
8701 echo is set
8703 echo is not set
8719 echo is set
8721 echo is not set
8734 code='if [[ $- = *U* ]]; then echo $i on; else echo $i off; fi'
8737 echo $((++i)) done
8749 code='if [[ $- = *U* ]]; then echo $i on; else echo $i off; fi'
8752 echo $((++i)) done
8845 "$__progname" -c $'alias a="echo OK"\na'
8853 alias foo='echo makro'
8855 echo funktion
8865 alias foo='echo makro'
8867 echo funktion
8877 alias foo='echo makro'
8879 echo funktion
8902 echo "${#foo[*]}|${foo[0]}|${foo[1]}|${foo[2]}|${foo[3]}|${foo[4]}|"
8912 echo "${#foo[*]}|${foo[0]}|${foo[1]}|${foo[2]}|${foo[3]}|${foo[4]}|"
8928 …#foo[*]}" "${foo[0]}" "${foo[1]}" "${foo[2]}" "${foo[3]}" "${foo[4]}" "${foo[5]}" "${foo[6]}"; echo
8933 …#foo[*]}" "${foo[0]}" "${foo[1]}" "${foo[2]}" "${foo[3]}" "${foo[4]}" "${foo[5]}" "${foo[6]}"; echo
8938 …#foo[*]}" "${foo[0]}" "${foo[1]}" "${foo[2]}" "${foo[3]}" "${foo[4]}" "${foo[5]}" "${foo[6]}"; echo
8951 echo ${foo[*]}
8953 echo ${foo[4294967295]} g ${foo[*]}
8964 echo "${#foo[*]}|${foo[0]}|${foo[1]}|${foo[2]}|${foo[3]}|${foo[4]}|${foo[5]}|"
8968 echo "<${arr[0]}><${arr[5]}>"
8981 echo "${#foo[*]}|${foo[0]}|${foo[1]}|${foo[2]}|${foo[3]}|${foo[4]}|${foo[5]}|"
8983 echo k= ${!x[*]} .
8984 echo v= ${x[*]} .
8990 echo "<${arr[0]}><${arr[5]}>"
9005 echo -n "$((i++))<$x>"
9007 echo
9011 echo =
9015 echo =
9016 echo a $(of ${foo[*]}) = $(of ${bar[*]}) a
9017 echo b $(of "${foo[*]}") = $(of "${bar[*]}") b
9018 echo c $(of ${foo[@]}) = $(of ${bar[@]}) c
9019 echo d $(of "${foo[@]}") = $(of "${bar[@]}") d
9020 echo e $(of ${!foo[*]}) = $(of ${!bar[*]}) e
9021 echo f $(of "${!foo[*]}") = $(of "${!bar[*]}") f
9022 echo g $(of ${!foo[@]}) = $(of ${!bar[@]}) g
9023 echo h $(of "${!foo[@]}") = $(of "${!bar[@]}") h
9045 echo !arz: ${!arz}
9046 echo !arz[0]: ${!arz[0]}
9047 echo !arz[1]: ${!arz[1]}
9049 echo !arz: ${!arz}
9050 echo !arz[0]: ${!arz[0]}
9051 echo !arz[1]: ${!arz[1]}
9053 echo !arz: ${!arz}
9054 echo !arz[0]: ${!arz[0]}
9055 echo !arz[1]: ${!arz[1]}
9154 unset foo; foo=(bar); foo+=(baz); echo 1 ${!foo[*]} : ${foo[*]} .
9155 unset foo; foo=(foo bar); foo+=(baz); echo 2 ${!foo[*]} : ${foo[*]} .
9156 # unset foo; foo=([2]=foo [0]=bar); foo+=(baz [5]=quux); echo 3 ${!foo[*]} : ${foo[*]} .
9166 unset foo; foo=bar; foo+=baz; echo 1 $foo .
9167 unset foo; typeset -i16 foo=10; foo+=20; echo 2 $foo .
9176 a=($(echo a b))
9177 b=($(echo "a b"))
9178 c=("$(echo "a b")")
9179 d=("$(echo a b)")
9180 a+=($(echo c d))
9181 b+=($(echo "c d"))
9182 c+=("$(echo "c d")")
9183 d+=("$(echo c d)")
9184 echo ".a:${a[0]}.${a[1]}.${a[2]}.${a[3]}:"
9185 echo ".b:${b[0]}.${b[1]}.${b[2]}.${b[3]}:"
9186 echo ".c:${c[0]}.${c[1]}.${c[2]}.${c[3]}:"
9187 echo ".d:${d[0]}.${d[1]}.${d[2]}.${d[3]}:"
9209 echo ".fn:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9218 echo ".rfn:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9222 echo ".f0:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9224 echo ".f1:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9226 echo ".f2:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9227 echo ".rf0:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9229 echo ".rf1:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9231 echo ".rf2:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9253 echo ".fn:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9263 echo ".rfn:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9273 echo ".fnr:${z[0]}.${z[1]}.${z[2]}.${z[3]}:"
9278 echo ".f0:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9280 echo ".f1:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9282 echo ".f2:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9283 echo ".rf0:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9285 echo ".rf1:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9287 echo ".rf2:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9288 echo ".f0r:${z[0]}.${z[1]}.${z[2]}.${z[3]}:"
9290 echo ".f1r:${z[0]}.${z[1]}.${z[2]}.${z[3]}:"
9292 echo ".f2r:${z[0]}.${z[1]}.${z[2]}.${z[3]}:"
9318 echo ".fn:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9324 echo ".rfn:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9330 echo ".fnr:${z[0]}.${z[1]}.${z[2]}.${z[3]}:"
9335 echo ".f0:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9337 echo ".f1:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9339 echo ".f2:${x[0]}.${x[1]}.${x[2]}.${x[3]}:"
9340 echo ".rf0:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9342 echo ".rf1:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9344 echo ".rf2:${y[0]}.${y[1]}.${y[2]}.${y[3]}:"
9345 echo ".f0r:${z[0]}.${z[1]}.${z[2]}.${z[3]}:"
9347 echo ".f1r:${z[0]}.${z[1]}.${z[2]}.${z[3]}:"
9349 echo ".f2r:${z[0]}.${z[1]}.${z[2]}.${z[3]}:"
9373 echo ".fn:$x:"
9378 echo ".rfn:$y:"
9382 echo ".f0:$x:"
9384 echo ".f1:$x:"
9386 echo ".f2:$x:"
9387 echo ".rf0:$y:"
9389 echo ".rf1:$y:"
9391 echo ".rf2:$y:"
9413 echo ".fn:$x:"
9419 echo ".rfn:$y:"
9425 echo ".fnr:$z:"
9430 echo ".f0:$x:"
9432 echo ".f1:$x:"
9434 echo ".f2:$x:"
9435 echo ".rf0:$y:"
9437 echo ".rf1:$y:"
9439 echo ".rf2:$y:"
9440 echo ".f0r:$z:"
9442 echo ".f1r:$z:"
9444 echo ".f2r:$z:"
9470 echo ".fn:$x:"
9476 echo ".rfn:$y:"
9482 echo ".fnr:$z:"
9487 echo ".f0:$x:"
9489 echo ".f1:$x:"
9491 echo ".f2:$x:"
9492 echo ".rf0:$y:"
9494 echo ".rf1:$y:"
9496 echo ".rf2:$y:"
9497 echo ".f0r:$z:"
9499 echo ".f1r:$z:"
9501 echo ".f2r:$z:"
9526 echo f0: $x
9528 echo f1: $x
9530 echo f2: $x
9532 echo f3: $x
9534 echo f4: $x
9537 echo before: $x
9539 echo after: $x
9556 echo f0: $x
9558 echo f1: $x
9560 echo f2: $x
9562 echo f3: $x
9564 echo f4: $x
9567 echo before: $x
9569 echo after: $x
9587 echo a t${x:2:2} ${y:2:3} ${z:2:3} a
9588 echo b ${x::3} ${y::3} ${z::3} b
9589 echo c ${x:2:} ${y:2:} ${z:2:} c
9590 echo d ${x:2} ${y:2} ${z:2} d
9591 echo e ${x:2:6} ${y:2:6} ${z:2:7} e
9592 echo f ${x:2:7} ${y:2:7} ${z:2:8} f
9593 echo g ${x:2:8} ${y:2:8} ${z:2:9} g
9612 echo a ${x:$n:3} ${y:$n:3} ${z:$n:3} a
9613 echo b ${x:(n):3} ${y:(n):3} ${z:(n):3} b
9614 echo c ${x:(-2):1} ${y:(-2):1} ${z:(-2):1} c
9615 echo d t${x: n:2} ${y: n:3} ${z: n:3} d
9628 "$__progname" -c 'echo v${x:(n)}x'
9629 "$__progname" -c 'echo w${x: n}x'
9630 "$__progname" -c 'echo x${x:n}x'
9631 "$__progname" -c 'echo y${x:}x'
9632 "$__progname" -c 'echo z${x}x'
9634 "$__progname" -c 'x=abcdef;y=123;echo ${x:${y:2:1}:2}' >/dev/null 2>&1; echo $?
9649 echo a ${x:(y == 1 ? 2 : 3):4} a
9659 echo a ${x::1} ${x: -1} a
9660 echo b ${x::3} ${x: -3} b
9661 echo c ${x:1:2} ${x: -3:2} c
9662 echo d ${#x} d
9675 echo a ${x::1} ${x: -1} a
9676 echo b ${x::2} ${x: -2} b
9677 echo c ${x:1:1} ${x: -2:1} c
9678 echo d ${#x} d
9692 echo a ${baz: foo: bar}
9693 echo b ${baz: foo: $bar}
9694 echo c ${baz: $foo: bar}
9695 echo d ${baz: $foo: $bar}
9799 echo .
9807 showargs() { for s_arg in "$@"; do echo -n "<$s_arg> "; done; echo .; }
9811 n() { echo "$#"; }
9915 echo '#!'"$__progname" >foo
9921 echo "[$(./foo)]"
9947 echo .${#x} #
9954 echo "[$("$__progname" foo)]"
9974 echo .${#x} #
9981 echo "[$("$__progname" foo)]"
9999 echo .${#x} #
10006 echo "[$("$__progname" foo)]"
10096 echo $"Localise me!"
10182 echo "1 foo\"bar"
10192 echo "^$"
10230 echo 1 $? .
10239 alias foo='echo bar'
10242 echo baz
10246 foo 2>/dev/null || echo rab
10248 alias korn='echo bar'
10251 echo baz
10256 echo bfn
10259 alias bla='echo bal'
10279 echo '#!'"$__progname"
10280 echo "$1 {"
10281 echo ' echo "bar='\''$0'\'\"
10282 echo '}'
10291 x="korn: $(./f-korn)"; echo "${x/@("$u")/.}"
10292 x="dash: $(./f-dash)"; echo "${x/@("$u")/.}"
10293 x="bash: $(./f-bash)"; echo "${x/@("$u")/.}"
10310 echo "in <$i0> <$i1>"
10311 echo "out <${o0a#1#}|${o0b#1#}> <${o1a#1#}|${o1b#1#}>"
10313 echo "pass <$px> <$p0> <$p1> <$pl> <${i0#1#}|${i1#1#}>"
10315echo "specX <${tv1#16#}> <${tv2#16#}> <${tv3#16#}> <${tv4#16#}> <${tv5#16#}> <${tv6#16#}> <${tv7#1…
10317echo "specW <${tv1#1#}> <${tv2#1#}> <${tv3#1#}> <${tv4#1#}> <${tv5#1#}> <${tv6#1#}> <${tv7#1#}> <$…
10319 echo "specU <${xs1#1#}> <${xs2#1#}> <${xs3#1#}>"
10334 echo /$x/
10345 echo /$x/
10356 echo /$x/
10366 echo /$x/
10377 echo /$x/ # invalid utf-8
10387 echo /$x/ # invalid 2-byte
10397 echo /$x/ # invalid 2-byte
10407 echo /$x/ # invalid 3-byte
10418 echo /$x/ # non-minimalistic
10429 echo /$x/ # non-minimalistic
10774 echo 1 $(('a'))
10775 (echo 2f $(('aa'))) 2>&1 | sed "s/^[^']*'/2p '/"
10776 echo 3 $(('…'))
10778 echo "4 <$x>"
10779 echo 5 $(($x))
10780 echo 6 $((x))
10843 #echo expected to fail on this OS
10844 echo okay
10846 ulimit -dS $x && echo okay
10861 echo =1=
10863 echo =2=
10865 echo =3=
10867 echo =4=
10869 echo =5=
10888 echo ras
10889 echo dwa >&2
10890 echo tri >&3
10893 echo ===
10908 echo ras
10909 echo dwa >&2
10910 echo tri >&3
10913 echo ===
10928 echo ras
10929 echo dwa >&2
10930 echo tri >&3
10933 echo ===
10946 echo mir >foo
10950 echo ras
10951 echo dwa >&2
10952 echo tri >&3
10955 echo ===
10969 echo mir >foo
10973 echo ras
10974 echo dwa >&2
10975 echo tri >&3
10978 echo ===
10990 echo mir >foo
10994 echo ras
10995 echo dwa >&2
10996 echo tri >&3
10999 echo ===
11015 echo ras
11016 echo dwa >&2
11017 echo tri >&3
11023 echo -n >bar
11025 echo ===
11038 :>x; echo 1 "$("$__progname" -c 'echo foo>/dev/null&>x echo bar')" = "$(<x)" .
11039 :>x; echo 2 "$("$__progname" -o posix -c 'echo foo>/dev/null&>x echo bar')" = "$(<x)" .
11040 :>x; echo 3 "$("$__progname" -o sh -c 'echo foo>/dev/null&>x echo bar')" = "$(<x)" .
11042 1 = foo echo bar .
11051 for n in ${a#*=}; do echo 1hu ${n} .; done
11052 for n in "${a#*=}"; do echo 1hq ${n} .; done
11053 for n in ${a##*=}; do echo 2hu ${n} .; done
11054 for n in "${a##*=}"; do echo 2hq ${n} .; done
11055 for n in ${a%=*}; do echo 1pu ${n} .; done
11056 for n in "${a%=*}"; do echo 1pq ${n} .; done
11057 for n in ${a%%=*}; do echo 2pu ${n} .; done
11058 for n in "${a%%=*}"; do echo 2pq ${n} .; done
11070 echo "should not print"
11079 echo "should not print"
11088 echo "should not print"
11170 trap 'echo EXIT' EXIT
11171 trap 'echo ERR' ERR
11174 echo DONE
11186 echo $( set -e; false; echo foo )
11204 set foo bar baz ; for out in ; do echo $out ; done
11222 echo 1
11227 echo 2
11235 echo 3
11240 echo 4
11349 echo 1 $(case 1 in (1) echo yes;; (2) echo no;; esac) .
11350 echo 2 $(case 1 in 1) echo yes;; 2) echo no;; esac) .
11351 TEST=1234; echo 3 ${TEST: $(case 1 in (1) echo 1;; (*) echo 2;; esac)} .
11352 TEST=5678; echo 4 ${TEST: $(case 1 in 1) echo 1;; *) echo 2;; esac)} .
11353 a=($(case 1 in (1) echo 1;; (*) echo 2;; esac)); echo 5 ${a[0]} .
11354 a=($(case 1 in 1) echo 1;; *) echo 2;; esac)); echo 6 ${a[0]} .
11369 echo 1 $(($(case 1 in (1) echo 1;; (*) echo 2;; esac)+10)) .
11370 echo 2 $(($(case 1 in 1) echo 1;; *) echo 2;; esac)+20)) .
11371 (( a = $(case 1 in (1) echo 1;; (*) echo 2;; esac) )); echo 3 $a .
11372 (( a = $(case 1 in 1) echo 1;; *) echo 2;; esac) )); echo 4 $a .
11373 a=($(($(case 1 in (1) echo 1;; (*) echo 2;; esac)+10))); echo 5 ${a[0]} .
11374 a=($(($(case 1 in 1) echo 1;; *) echo 2;; esac)+20))); echo 6 ${a[0]} .
11393 echo yes
11396 echo $x
11407 echo $(typeset -i10 x=16#20; echo $x)
11408 echo $(typeset -Uui16 x=16#$(id -u)
11410 echo $(c=1; d=1
11413 echo $a $b $c $d)
11424 x() { case $1 in u) echo x ;;& *) echo $1 ;; esac; }
11430 \echo x
11433 \echo $1
11445 alias echo='echo a'
11447 echo moo
11448 ./pfn "$(echo foo)"
11450 ./pfn "$(echo b)"
11460 \echo a moo
11461 ./pfn "$(\echo a foo )"
11466 \echo a moo
11467 ./pfn "$(\echo a foo )"
11476 if [[ -z $__progname ]]; then echo >&2 call me with __progname; exit 1; fi
11507 (echo $foo | tr -dc 0-9; echo)
11509 cmd && echo ja || echo nein
11511 select file in *; do echo "<$file>" ; break ; done
11513 time for i in {1,2,3} ; do echo $i ; done
11515 case $foo in 1) echo eins;& 2) echo zwei ;| *) echo kann net bis drei zählen;; esac
11517 if ! [[ 1 = 1 ]] ; then echo eins; elif [[ 1 = 2 ]]; then echo zwei ;else echo drei; fi
11519 i=1; while (( i < 10 )); do echo $i; let ++i; done
11521 i=10; until (( !--i )) ; do echo $i; done
11525 function korn { echo eins; echo zwei ; }
11540 echo $(true) $((1+ 2)) ${ :;} ${| REPLY=x;}
11542 echo fo\ob\"a\`r\'b\$az
11543 echo "fo\ob\"a\`r\'b\$az"
11544 echo 'fo\ob\"a\`r'\''b\$az'
11550 EOFN); echo $x
11554 EOFN ); echo $x
11596 (echo $foo | tr -dc 0-9; echo)
11599 ( \echo $foo | \tr -dc 0-9
11600 \echo )
11603 (echo $foo | tr -dc 0-9; echo)
11606 x=$( ( \echo $foo | \tr -dc 0-9 ; \echo ) )
11609 (echo $foo | tr -dc 0-9; echo)
11612 x=$( ( ( \echo $foo | \tr -dc 0-9 ; \echo ) ) | \tr u x )
11615 cmd && echo ja || echo nein
11618 \cmd && \echo ja || \echo nein
11621 cmd && echo ja || echo nein
11624 x=$(\cmd && \echo ja || \echo nein )
11627 cmd && echo ja || echo nein
11630 x=$( ( \cmd && \echo ja || \echo nein ) | \tr u x )
11633 select file in *; do echo "<$file>" ; break ; done
11638 \echo "<$file>"
11643 select file in *; do echo "<$file>" ; break ; done
11646 x=$(select file in * ; do \echo "<$file>" ; \break ; done )
11649 select file in *; do echo "<$file>" ; break ; done
11652 x=$( ( select file in * ; do \echo "<$file>" ; \break ; done ) | \tr u x )
11655 time for i in {1,2,3} ; do echo $i ; done
11660 \echo $i
11664 time for i in {1,2,3} ; do echo $i ; done
11667 x=$(time for i in {1,2,3} ; do \echo $i ; done )
11670 time for i in {1,2,3} ; do echo $i ; done
11673 x=$( ( time for i in {1,2,3} ; do \echo $i ; done ) | \tr u x )
11676 case $foo in 1) echo eins;& 2) echo zwei ;| *) echo kann net bis drei zählen;; esac
11681 \echo eins
11684 \echo zwei
11687 \echo kann net bis drei zählen
11692 case $foo in 1) echo eins;& 2) echo zwei ;| *) echo kann net bis drei zählen;; esac
11695 …x=$(case $foo in (1) \echo eins ;& (2) \echo zwei ;| (*) \echo kann net bis drei zählen ;; esac…
11698 case $foo in 1) echo eins;& 2) echo zwei ;| *) echo kann net bis drei zählen;; esac
11701 …x=$( ( case $foo in (1) \echo eins ;& (2) \echo zwei ;| (*) \echo kann net bis drei zählen ;; e…
11704 if ! [[ 1 = 1 ]] ; then echo eins; elif [[ 1 = 2 ]]; then echo zwei ;else echo drei; fi
11709 \echo eins
11712 \echo zwei
11714 \echo drei
11718 if ! [[ 1 = 1 ]] ; then echo eins; elif [[ 1 = 2 ]]; then echo zwei ;else echo drei; fi
11721 …x=$(if ! [[ 1 = 1 ]] ; then \echo eins ; elif [[ 1 = 2 ]] ; then \echo zwei ; else \echo drei ; fi…
11724 if ! [[ 1 = 1 ]] ; then echo eins; elif [[ 1 = 2 ]]; then echo zwei ;else echo drei; fi
11727 …x=$( ( if ! [[ 1 = 1 ]] ; then \echo eins ; elif [[ 1 = 2 ]] ; then \echo zwei ; else \echo drei ;…
11730 i=1; while (( i < 10 )); do echo $i; let ++i; done
11738 \echo $i
11743 i=1; while (( i < 10 )); do echo $i; let ++i; done
11746 x=$(i=1 ; while { \\builtin let " i < 10 " ; } ; do \echo $i ; \let ++i ; done )
11749 i=1; while (( i < 10 )); do echo $i; let ++i; done
11752 x=$( ( i=1 ; while { \\builtin let " i < 10 " ; } ; do \echo $i ; \let ++i ; done ) | \tr u x )
11755 i=10; until (( !--i )) ; do echo $i; done
11763 \echo $i
11767 i=10; until (( !--i )) ; do echo $i; done
11770 x=$(i=10 ; until { \\builtin let " !--i " ; } ; do \echo $i ; done )
11773 i=10; until (( !--i )) ; do echo $i; done
11776 x=$( ( i=10 ; until { \\builtin let " !--i " ; } ; do \echo $i ; done ) | \tr u x )
11798 function korn { echo eins; echo zwei ; }
11803 \echo eins
11804 \echo zwei
11811 function korn { echo eins; echo zwei ; }
11815 x=$(function korn { \echo eins ; \echo zwei ; } ; bourne() { \logger * & } )
11818 function korn { echo eins; echo zwei ; }
11822 x=$( ( function korn { \echo eins ; \echo zwei ; } ; bourne() { \logger * & } ) | \tr u x )
11927 echo $(true) $((1+ 2)) ${ :;} ${| REPLY=x;}
11930 \echo $(\true ) $((1+ 2)) ${ \: ;} ${|REPLY=x ;}
11933 echo $(true) $((1+ 2)) ${ :;} ${| REPLY=x;}
11936 x=$(\echo $(\true ) $((1+ 2)) ${ \: ;} ${|REPLY=x ;} )
11939 echo $(true) $((1+ 2)) ${ :;} ${| REPLY=x;}
11942 x=$( ( \echo $(\true ) $((1+ 2)) ${ \: ;} ${|REPLY=x ;} ) | \tr u x )
11945 echo fo\ob\"a\`r\'b\$az
11946 echo "fo\ob\"a\`r\'b\$az"
11947 echo 'fo\ob\"a\`r'\''b\$az'
11950 \echo fo\ob\"a\`r\'b\$az
11951 \echo "fo\ob\"a\`r\'b\$az"
11952 \echo "fo\\ob\\\"a\\\`r"\'"b\\\$az"
11955 echo fo\ob\"a\`r\'b\$az
11956 echo "fo\ob\"a\`r\'b\$az"
11957 echo 'fo\ob\"a\`r'\''b\$az'
11960 x=$(\echo fo\ob\"a\`r\'b\$az ; \echo "fo\ob\"a\`r\'b\$az" ; \echo "fo\\ob\\\"a\\\`r"\'"b\\\$az" )
11963 echo fo\ob\"a\`r\'b\$az
11964 echo "fo\ob\"a\`r\'b\$az"
11965 echo 'fo\ob\"a\`r'\''b\$az'
11968 …x=$( ( \echo fo\ob\"a\`r\'b\$az ; \echo "fo\ob\"a\`r\'b\$az" ; \echo "fo\\ob\\\"a\\\`r"\'"b\\\$az"…
11991 EOFN); echo $x
11998 \echo $x
12003 EOFN); echo $x
12009 ) ; \echo $x )
12014 EOFN); echo $x
12020 ) ; \echo $x ) | \tr u x )
12025 EOFN ); echo $x
12032 \echo $x
12037 EOFN ); echo $x
12043 ) ; \echo $x )
12048 EOFN ); echo $x
12054 ) ; \echo $x ) | \tr u x )
12177 if [[ -z $__progname ]]; then echo >&2 call me with __progname; exit 1; fi
12208 (echo $foo | tr -dc 0-9 >&3; echo >&3) >&3
12210 cmd >&3 && >&3 echo ja || echo >&3 nein
12212 select file in *; do echo "<$file>" ; break >&3 ; done >&3
12214 for i in {1,2,3} ; do time >&3 echo $i ; done >&3
12216 …case $foo in 1) echo eins >&3;& 2) echo zwei >&3 ;| *) echo kann net bis drei zählen >&3;; e…
12218 …if ! [[ 1 = 1 ]] >&3 ; then echo eins; elif [[ 1 = 2 ]] >&3; then echo zwei ;else echo
12220 i=1; while (( i < 10 )) >&3; do echo $i; let ++i; done >&3
12222 i=10; until (( !--i )) >&3 ; do echo $i; done >&3
12226 function korn { echo eins; echo >&3 zwei ; }
12229 echo $(true >&3) $((1+ 2))
12252 (echo $foo | tr -dc 0-9 >&3; echo >&3) >&3
12255 ( \echo $foo | \tr -dc 0-9 >&3
12256 \echo >&3 ) >&3
12259 (echo $foo | tr -dc 0-9 >&3; echo >&3) >&3
12262 x=$( ( \echo $foo | \tr -dc 0-9 >&3 ; \echo >&3 ) >&3 )
12265 (echo $foo | tr -dc 0-9 >&3; echo >&3) >&3
12268 x=$( ( ( \echo $foo | \tr -dc 0-9 >&3 ; \echo >&3 ) >&3 ) | \tr u x )
12271 cmd >&3 && >&3 echo ja || echo >&3 nein
12274 \cmd >&3 && \echo ja >&3 || \echo nein >&3
12277 cmd >&3 && >&3 echo ja || echo >&3 nein
12280 x=$(\cmd >&3 && \echo ja >&3 || \echo nein >&3 )
12283 cmd >&3 && >&3 echo ja || echo >&3 nein
12286 x=$( ( \cmd >&3 && \echo ja >&3 || \echo nein >&3 ) | \tr u x )
12289 select file in *; do echo "<$file>" ; break >&3 ; done >&3
12294 \echo "<$file>"
12299 select file in *; do echo "<$file>" ; break >&3 ; done >&3
12302 x=$(select file in * ; do \echo "<$file>" ; \break >&3 ; done >&3 )
12305 select file in *; do echo "<$file>" ; break >&3 ; done >&3
12308 x=$( ( select file in * ; do \echo "<$file>" ; \break >&3 ; done >&3 ) | \tr u x )
12311 for i in {1,2,3} ; do time >&3 echo $i ; done >&3
12316 time \echo $i >&3
12320 for i in {1,2,3} ; do time >&3 echo $i ; done >&3
12323 x=$(for i in {1,2,3} ; do time \echo $i >&3 ; done >&3 )
12326 for i in {1,2,3} ; do time >&3 echo $i ; done >&3
12329 x=$( ( for i in {1,2,3} ; do time \echo $i >&3 ; done >&3 ) | \tr u x )
12332 …case $foo in 1) echo eins >&3;& 2) echo zwei >&3 ;| *) echo kann net bis drei zählen >&3;; e…
12337 \echo eins >&3
12340 \echo zwei >&3
12343 \echo kann net bis drei zählen >&3
12348 …case $foo in 1) echo eins >&3;& 2) echo zwei >&3 ;| *) echo kann net bis drei zählen >&3;; e…
12351 …x=$(case $foo in (1) \echo eins >&3 ;& (2) \echo zwei >&3 ;| (*) \echo kann net bis drei zählen …
12354 …case $foo in 1) echo eins >&3;& 2) echo zwei >&3 ;| *) echo kann net bis drei zählen >&3;; e…
12357 …x=$( ( case $foo in (1) \echo eins >&3 ;& (2) \echo zwei >&3 ;| (*) \echo kann net bis drei zähl…
12360 …if ! [[ 1 = 1 ]] >&3 ; then echo eins; elif [[ 1 = 2 ]] >&3; then echo zwei ;else echo
12365 \echo eins
12368 \echo zwei
12370 \echo drei
12374 …if ! [[ 1 = 1 ]] >&3 ; then echo eins; elif [[ 1 = 2 ]] >&3; then echo zwei ;else echo
12377 …x=$(if ! [[ 1 = 1 ]] >&3 ; then \echo eins ; elif [[ 1 = 2 ]] >&3 ; then \echo zwei ; else \echo d…
12380 …if ! [[ 1 = 1 ]] >&3 ; then echo eins; elif [[ 1 = 2 ]] >&3; then echo zwei ;else echo
12383 …x=$( ( if ! [[ 1 = 1 ]] >&3 ; then \echo eins ; elif [[ 1 = 2 ]] >&3 ; then \echo zwei ; else \ech…
12386 i=1; while (( i < 10 )) >&3; do echo $i; let ++i; done >&3
12394 \echo $i
12399 i=1; while (( i < 10 )) >&3; do echo $i; let ++i; done >&3
12402 x=$(i=1 ; while { \\builtin let " i < 10 " ; } >&3 ; do \echo $i ; \let ++i ; done >&3 )
12405 i=1; while (( i < 10 )) >&3; do echo $i; let ++i; done >&3
12408 …x=$( ( i=1 ; while { \\builtin let " i < 10 " ; } >&3 ; do \echo $i ; \let ++i ; done >&3 ) | \tr …
12411 i=10; until (( !--i )) >&3 ; do echo $i; done >&3
12419 \echo $i
12423 i=10; until (( !--i )) >&3 ; do echo $i; done >&3
12426 x=$(i=10 ; until { \\builtin let " !--i " ; } >&3 ; do \echo $i ; done >&3 )
12429 i=10; until (( !--i )) >&3 ; do echo $i; done >&3
12432 x=$( ( i=10 ; until { \\builtin let " !--i " ; } >&3 ; do \echo $i ; done >&3 ) | \tr u x )
12454 function korn { echo eins; echo >&3 zwei ; }
12459 \echo eins
12460 \echo zwei >&3
12467 function korn { echo eins; echo >&3 zwei ; }
12471 x=$(function korn { \echo eins ; \echo zwei >&3 ; } ; bourne() { \logger * >&3 & } )
12474 function korn { echo eins; echo >&3 zwei ; }
12478 …x=$( ( function korn { \echo eins ; \echo zwei >&3 ; } ; bourne() { \logger * >&3 & } ) | \tr u x…
12481 echo $(true >&3) $((1+ 2))
12484 \echo $(\true >&3 ) $((1+ 2))
12487 echo $(true >&3) $((1+ 2))
12490 x=$(\echo $(\true >&3 ) $((1+ 2)) )
12493 echo $(true >&3) $((1+ 2))
12496 x=$( ( \echo $(\true >&3 ) $((1+ 2)) ) | \tr u x )
12505 echo "ob $foo ."
12506 echo "${
12507 echo "ib $foo :"
12509 echo "ia $foo :"
12512 echo "oa $foo ."
12524 x=q; e=1; x=${ echo a; e=2; echo x$e;}; echo 1:y$x,$e,$?.
12525 x=q; e=1; x=${ echo a; typeset e=2; echo x$e;}; echo 2:y$x,$e,$?.
12526 x=q; e=1; x=${ echo a; typeset e=2; return 3; echo x$e;}; echo 3:y$x,$e,$?.
12540 echo "before: x<$x> y<$y> z<$z> R<$REPLY>"
12543 echo "start: x<$x> y<$y> z<$z> R<$REPLY>"
12548 echo "end: x<$x> y<$y> z<$z> R<$REPLY>"
12550 echo "after: x<$x> y<$y> z<$z> R<$REPLY>"
12554 echo -n this used to segfault
12555 echo ${|true;}$(true).
12569 echo molto bene
12573 echo si
12577 echo yeap
12579 echo meow
12581 echo = $?
12583 ! false; then echo foo; else echo bar; fi
12599 echo molto bene
12603 echo si
12607 echo yeap
12609 echo meow
12611 echo = $?
12613 ! false; then echo foo; else echo bar; fi
12633 echo $1=nz
12635 echo $1=zf
12639 (echo $x)
12640 echo =1
12641 (echo $y)
12642 echo =2
12644 echo =3
12646 echo =4
12648 echo =5
12650 echo =6
12652 echo =7
12653 (echo at=$@)
12654 echo =8
12655 (echo asterisk=$*)
12656 echo =9
12657 (echo $?)
12658 echo =10
12659 (echo $!)
12660 echo =11
12661 (echo $-)
12662 echo =12
12663 #(echo $_)
12664 #echo =13
12665 (echo $#)
12666 echo =14
12668 echo =15
12708 echo !ind: ${!ind}
12709 echo ind: $ind
12710 echo !ir2: ${!ir2}
12711 echo ir2: $ir2
12713 echo !ind: ${!ind}
12714 echo ind: $ind
12716 echo !ir2: ${!ir2}
12717 echo ir2: $ir2
12723 echo !ind[1]: ${!ind[1]}
12724 echo !ir2: $!ir2
12725 echo ind[1]: ${ind[1]}
12726 echo ir2: $ir2
12751 echo entering
12752 echo !v: ${!v}
12753 echo !bar: ${!bar}
12754 echo !baz: ${!baz}
12755 echo bar: $bar
12756 echo v: $v
12758 echo bar: $bar
12759 echo v: $v
12760 echo exiting
12763 echo bar: $bar
12765 echo bar: $bar
12804 echo sind $foo .
12806 echo blah $foo .
12817 if ( (echo fubar)|tr u x); then
12818 echo ja
12820 echo nein
12830 echo $( (echo fubar)|tr u x) $?
12838 x=$( (echo fubar)|tr u x); echo $x $?
12846 if ((echo fubar)|tr u x); then
12847 echo ja
12849 echo nein
12859 echo $((echo fubar)|tr u x) $?
12867 x=$((echo fubar)|tr u x); echo $x $?
12875 if ( (echo fubar)|(tr u x)); then
12876 echo ja
12878 echo nein
12888 echo $( (echo fubar)|(tr u x)) $?
12896 x=$( (echo fubar)|(tr u x)); echo $x $?
12904 if ((echo fubar)|(tr u x)); then
12905 echo ja
12907 echo nein
12917 echo $((echo fubar)|(tr u x)) $?
12925 x=$((echo fubar)|(tr u x)); echo $x $?
12933 ( (echo 'fo o$bar' "baz\$bla\"" m\$eh) | tr a A)
12934 ((echo 'fo o$bar' "baz\$bla\"" m\$eh) | tr a A)
12939 name: echo-test-1
12941 Test what the echo builtin does (mksh)
12944 echo -n 'foo\x40bar'
12945 echo -e '\tbaz'
12949 name: echo-test-1-ebcdic
12951 Test what the echo builtin does (mksh)
12954 echo -n 'foo\x7Cbar'
12955 echo -e '\tbaz'
12959 name: echo-test-2
12961 Test what the echo builtin does (POSIX)
12968 echo -n 'foo\x40bar'
12969 echo -e '\tbaz'
12973 name: echo-test-3-mnbsd
12975 Test what the echo builtin does, and test a compatibility flag.
12978 "$__progname" -c 'echo -n 1=\\x40$1; echo -e \\x2E' -- foo bar
12979 "$__progname" -o posix -c 'echo -n 2=\\x40$1; echo -e \\x2E' -- foo bar
12980 "$__progname" -o sh -c 'echo -n 3=\\x40$1; echo -e \\x2E' -- foo bar
12986 name: echo-test-3-normal
12988 Test what the echo builtin does, and test a compatibility flag.
12991 "$__progname" -c 'echo -n 1=\\x40$1; echo -e \\x2E' -- foo bar
12992 "$__progname" -o posix -c 'echo -n 2=\\x40$1; echo -e \\x2E' -- foo bar
12993 "$__progname" -o sh -c 'echo -n 3=\\x40$1; echo -e \\x2E' -- foo bar
12999 name: echo-test-3-ebcdic
13001 Test what the echo builtin does, and test a compatibility flag.
13004 "$__progname" -c 'echo -n 1=\\x7C$1; echo -e \\x4B' -- foo bar
13005 "$__progname" -o posix -c 'echo -n 2=\\x7C$1; echo -e \\x4B' -- foo bar
13006 "$__progname" -o sh -c 'echo -n 3=\\x7C$1; echo -e \\x4B' -- foo bar
13018 echo "OPTARG=$OPTARG, OPTIND=$OPTIND, optc=$optc."
13020 echo done
13033 echo "OPTARG=$OPTARG, OPTIND=$OPTIND, optc=$optc."
13035 echo done
13047 getopts x:y opt && echo "${OPTARG-unset}"
13048 getopts x:y opt && echo "${OPTARG-unset}"
13249 "$__progname" -c 'x=$(tr z r <<<baz); echo $x'
13257 test \( ! -e \) ; echo $?
13265 test \( -e \) ; echo $?
13273 test ! -e ; echo $?
13281 test -e ; echo $?
13290 a) echo a ;;
13291 b) echo b ;;
13292 c) echo c ;;
13293 *) echo x ;;
13295 echo =
13297 a) echo a ;&
13298 b) echo b ;&
13299 c) echo c ;&
13300 *) echo x ;&
13302 echo =
13304 a) echo a ;|
13305 b) echo b ;|
13306 c) echo c ;|
13307 *) echo x ;|
13327 }) echo brace ;;
13328 *) echo no ;;
13332 esac) echo esac ;;
13333 *) echo no ;;
13349 echo "before 0='$0' 1='$1' 2='$2'"
13351 echo "after 0='$0' 1='$1' 2='$2'"
13354 echo "before 0='$0' 1='$1' 2='$2'"
13356 echo "after 0='$0' 1='$1' 2='$2'"
13358 echo = without command
13360 echo = with command
13362 echo = done
13544 echo 'GNU bash, version 2.05b.0(1)-release (i386-ecce-mirbsd10)
13548 "$__progname" -xc 'foo=$(./bash --version 2>&1 | sed q); echo "=$foo="'
13586 echo 2 "${-/s}" .
13589 echo 1 "${-/s}" .
13591 echo 3 "${-/s}" .
13606 echo 2 "${-/s}" .
13609 echo 1 "${-/s}" .
13611 echo 3 "${-/s}" .
13625 echo 2 "${-/s}" .
13628 echo 1 "${-/s}" .
13630 echo 3 "${-/s}" .