Hash :
363281b3
Author :
Date :
2019-06-10T13:29:03
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
a |& b &> c
a >&2
a 2<&
a <> b
a &>> b
a && b || c
<(yes) <(if true; then :; fi) <(echo) <(true)
<(for x in a b; do :; done)
<(select x in a b; do :; done)
>(yes) >(if true; then :; fi) >(echo) >(true)
>(for x in a b; do :; done)
>(select x in a b; do :; done)
${x:1:2} ${x:-a} ${x:=a} ${x:?a} ${x:+a}
${!x} ${x/a/b}
${x#*a} ${x##*a} ${x%a*} ${x%%a*}
${x^a} ${x^^a} ${x,a} ${x,,a}
----------------------------------------------------
[
"a ", ["operator", ["|&"]], " b ", ["operator", ["&>"]], " c\r\na ",
["operator", [">"]], ["file-descriptor", "&2"], "\r\na ",
["operator", [
["file-descriptor", "2"], "<&"
]],
"\r\na ", ["operator", ["<>"]], " b\r\na ",
["operator", ["&>>"]], " b\r\na ",
["operator", ["&&"]], " b ", ["operator", ["||"]], " c\r\n\r\n",
["operator", ["<"]], ["punctuation", "("], ["function", "yes"], ["punctuation", ")"],
["operator", ["<"]], ["punctuation", "("], ["keyword", "if"], ["boolean", "true"], ["punctuation", ";"],
["keyword", "then"], ["builtin", ":"], ["punctuation", ";"], ["keyword", "fi"], ["punctuation", ")"],
["operator", ["<"]], ["punctuation", "("], ["builtin", "echo"], ["punctuation", ")"],
["operator", ["<"]], ["punctuation", "("], ["boolean", "true"], ["punctuation", ")"],
["operator", ["<"]], ["punctuation", "("], ["keyword", "for"], ["for-or-select", "x"], ["keyword", "in"], " a b", ["punctuation", ";"],
["keyword", "do"], ["builtin", ":"], ["punctuation", ";"], ["keyword", "done"], ["punctuation", ")"],
["operator", ["<"]], ["punctuation", "("], ["keyword", "select"], ["for-or-select", "x"], ["keyword", "in"], " a b", ["punctuation", ";"],
["keyword", "do"], ["builtin", ":"], ["punctuation", ";"], ["keyword", "done"], ["punctuation", ")"],
["operator", [">"]], ["punctuation", "("], ["function", "yes"], ["punctuation", ")"],
["operator", [">"]], ["punctuation", "("], ["keyword", "if"], ["boolean", "true"], ["punctuation", ";"],
["keyword", "then"], ["builtin", ":"], ["punctuation", ";"], ["keyword", "fi"], ["punctuation", ")"],
["operator", [">"]], ["punctuation", "("], ["builtin", "echo"], ["punctuation", ")"],
["operator", [">"]], ["punctuation", "("], ["boolean", "true"], ["punctuation", ")"],
["operator", [">"]], ["punctuation", "("], ["keyword", "for"], ["for-or-select", "x"], ["keyword", "in"], " a b", ["punctuation", ";"],
["keyword", "do"], ["builtin", ":"], ["punctuation", ";"], ["keyword", "done"], ["punctuation", ")"],
["operator", [">"]], ["punctuation", "("], ["keyword", "select"], ["for-or-select", "x"], ["keyword", "in"], " a b", ["punctuation", ";"],
["keyword", "do"], ["builtin", ":"], ["punctuation", ";"], ["keyword", "done"], ["punctuation", ")"],
["variable", ["${x", ["operator", ":"], "1", ["operator", ":"], "2}"]],
["variable", ["${x", ["operator", ":-"], "a}"]],
["variable", ["${x", ["operator", ":="], "a}"]],
["variable", ["${x", ["operator", ":?"], "a}"]],
["variable", ["${x", ["operator", ":+"], "a}"]],
["variable", ["${", ["operator", "!"], "x}"]],
["variable", ["${x", ["operator", "/"], "a", ["operator", "/"], "b}"]],
["variable", ["${x", ["operator", "#"], "*a}"]],
["variable", ["${x", ["operator", "##"], "*a}"]],
["variable", ["${x", ["operator", "%"], "a*}"]],
["variable", ["${x", ["operator", "%%"], "a*}"]],
["variable", ["${x", ["operator", "^"], "a}"]],
["variable", ["${x", ["operator", "^^"], "a}"]],
["variable", ["${x", ["operator", ","], "a}"]],
["variable", ["${x", ["operator", ",,"], "a}"]]
]
----------------------------------------------------
Checks for operators.