Branch
Hash :
b9512b22
Author :
Date :
2022-07-25T21:24:17
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
$ echo 'Foo
> Bar'
$ echo "Foo
> Bar"
$ echo <<- STRING_END
foo
bar
STRING_END
$ echo <<- "STRING_END"
foo
bar
STRING_END
$ echo \'a # '
$ cat << "EOF" > /etc/ipsec.secrets
: RSA vpn-server-a.key
# : RSA vpn-server-b.key
EOF
$ LC_ALL=C tr -cd 'a-zA-Z0-9_-;:!?.@\\*/#%$' < /dev/random | head -c 8
y_#!$U48
----------------------------------------------------
[
["command", [
["shell-symbol", "$"],
["bash", [
["builtin", "echo"],
["string", "'Foo\r\n> Bar'"]
]]
]],
["command", [
["shell-symbol", "$"],
["bash", [
["builtin", "echo"],
["string", ["\"Foo\r\n> Bar\""]]
]]
]],
["command", [
["shell-symbol", "$"],
["bash", [
["builtin", "echo"],
["operator", ["<<-"]],
["string", ["STRING_END\r\nfoo\r\nbar\r\nSTRING_END"]]
]]
]],
["command", [
["shell-symbol", "$"],
["bash", [
["builtin", "echo"],
["operator", ["<<-"]],
["string", ["\"STRING_END\"\r\nfoo\r\nbar\r\nSTRING_END"]]
]]
]],
["command", [
["shell-symbol", "$"],
["bash", [
["builtin", "echo"],
["punctuation", "\\"],
"'a ",
["comment", "# '"]
]]
]],
["command", [
["shell-symbol", "$"],
["bash", [
["function", "cat"],
["operator", ["<<"]],
["string", [
"\"EOF\"",
["bash", [
["operator", [">"]],
" /etc/ipsec.secrets"
]],
"\r\n: RSA vpn-server-a.key\r\n# : RSA vpn-server-b.key\r\nEOF"
]]
]]
]],
["command", [
["shell-symbol", "$"],
["bash", [
["assign-left", [
["environment", "LC_ALL"]
]],
["operator", ["="]],
"C ",
["function", "tr"],
["parameter", "-cd"],
["string", "'a-zA-Z0-9_-;:!?.@\\\\*/#%$'"],
["operator", ["<"]],
" /dev/random ",
["operator", ["|"]],
["function", "head"],
["parameter", "-c"],
["number", "8"]
]]
]],
["output", "y_#!$U48"]
]
----------------------------------------------------
Checks for multi-line strings inside commands.