=============================== Commands =============================== whoami --- (program (command (command_name (word)))) =============================== Commands with arguments =============================== cat file1.txt git diff --word-diff=color -- file1.txt file2.txt --- (program (command (command_name (word)) (word)) (command (command_name (word)) (word) (word) (word) (word) (word))) =============================== Quoted command names =============================== "$a/$b" c --- (program (command (command_name (string (simple_expansion (variable_name)) (simple_expansion (variable_name)))) (word))) =============================== Commands with numeric arguments =============================== exit 1 --- (program (command (command_name (word)) (word))) =================================== Commands with environment variables =================================== VAR1=1 ./script/test VAR1=a VAR2="ok" git diff --word-diff=color --- (program (command (variable_assignment (variable_name) (word)) (command_name (word))) (command (variable_assignment (variable_name) (word)) (variable_assignment (variable_name) (string)) (command_name (word)) (word) (word))) =================================== Empty environment variables =================================== VAR1= VAR2= echo --- (program (variable_assignment (variable_name)) (command (variable_assignment (variable_name)) (command_name (word)))) =============================== File redirects =============================== whoami > /dev/null cat a b > /dev/null 2>&1 whoami --- (program (redirected_statement (command (command_name (word))) (file_redirect (word))) (redirected_statement (command (command_name (word)) (word) (word)) (file_redirect (word))) (command (file_redirect (file_descriptor) (word)) (command_name (word)))) =============================== File redirects (noclobber override) =============================== whoami >| /dev/null cat a b >| /dev/null --- (program (redirected_statement (command (command_name (word))) (file_redirect (word))) (redirected_statement (command (command_name (word)) (word) (word)) (file_redirect (word)))) =============================== Heredoc redirects =============================== node < $tmpfile a $B ${C} EOF wc -l $tmpfile --- (program (redirected_statement (command (command_name (word))) (heredoc_redirect (heredoc_start)) (file_redirect (simple_expansion (variable_name)))) (heredoc_body (simple_expansion (variable_name)) (expansion (variable_name))) (command (command_name (word)) (word) (simple_expansion (variable_name)))) ================================= Heredocs with pipes ================================ one <