busybox/shell/ash_test/ash-heredoc/herestring1.tests
Denys Vlasenko 106546961d ash: implement <<<here_string syntax
function                                             old     new   delta
write2pipe                                             -     133    +133
.rodata                                           105992  106009     +17
readtoken1                                          3101    3111     +10
cmdtxt                                               631     641     +10
nodesize                                              27      28      +1
redirect                                             961     916     -45
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/1 up/down: 171/-45)           Total: 126 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-09-02 11:46:11 +02:00

35 lines
466 B
Text
Executable file

cat <<<one
cat <<<\_two
cat <<<"\_three"
cat <<<'\_four'
cat <<<\\_two
cat <<<"\\_three"
cat <<<'\\_four'
cat <<<$'two_newlines\n'
cat <<</bin/c*
cat <<<star_*
cat <<<star_\*
cat <<<"star_*"
cat <<<"star_\*"
cat <<<'star_*'
cat <<<'star_\*'
var=$'line1
line2
line3'
cat <<<$var
cat <<<"$var"
i=10
until test $((--i)) = 0; do
cat <<<$((2**i))
done
a=qwerty
cat <<<`echo v'-$a-\t-\\-\"-\x-\`-\--\z-\*-\?-'`
cat <<<"`echo v'-$a-\t-\\-\"-\x-\`-\--\z-\*-\?-'`"