-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
The herestring (<<<) operator in bash is used to pass literal strings/variables into the STDIN of another command. For example. the following two lines are functionally equivalent:
echo "$foo" | grep "x"
grep "x" <<< "$foo"Trying to parse this with bash-parser results in a parse error:
const ast = parse('grep "x" <<< "$foo"')Error: Parse error on line 1: Unexpected 'LESS'
at parse (…/js_bash_ast/node_modules/bash-parser/src/index.js:52:9)
at fs.readFile (…/js_bash_ast/index.js:14:14)
at …/js_bash_ast/node_modules/graceful-fs/graceful-fs.js:78:16
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
documentation on the herestrings: http://tldp.org/LDP/abs/html/x17837.html
piranna
Metadata
Metadata
Assignees
Labels
No labels