Redirector “<<<” in Ubuntu?
问题 I'm getting this error Syntax error: redirection unexpected in the line: if grep -q "^127.0.0." <<< "$RESULT" How I can run this in Ubuntu? 回答1: if grep -q "^127.0.0." <<< "$RESULT" then echo IF-THEN fi is a Bash-specific thing. If you are using a different bourne-compatable shell, try: if echo "$RESULT" | grep -q "^127.0.0." then echo IF-THEN fi 回答2: <<< is a bash-specific redirection operator (so it's not specific to Ubuntu). The documentation refers to it as a "Here String", a variant of