A quoted heredoc allows you to omit the outer quotes:
ssh user@host <<'END'
df | grep /dev/ | awk 'BEGIN{print "DISK", "%USAGE", "STATUS"} {split($5, a, "%"); var="GREEN"; print $1, $5, var}' | column -t
END
More Related Contents:
- I just assigned a variable, but echo $variable shows something else
- Why do I get “/bin/sh: Argument list too long” when passing quoted arguments?
- How to properly nest Bash backticks
- Do I need to quote command substitutions?
- What does 2>&1 mean here?
- How to reload .bashrc settings without logging out and back in again?
- How do I iterate over a range of numbers defined by variables in Bash?
- Why would a correct shell script give a wrapped/truncated/corrupted error message? [duplicate]
- Bash command line and input limit
- How to find the difference in days between two dates?
- Running script upon login in mac OS X [closed]
- Command substitution: backticks or dollar sign / paren enclosed? [duplicate]
- Using the RUN instruction in a Dockerfile with ‘source’ does not work
- Why start a shell command with a backslash?
- How to process each output line in a loop?
- Is there a TRY CATCH command in Bash
- Set a parent shell’s variable from a subshell
- What expands to all files in current directory recursively?
- What does it mean in shell when we put a command inside dollar sign and parentheses: $(command)
- How does bash tab completion work?
- Is mixing getopts with positional parameters possible?
- Counting lines or enumerating line numbers so I can loop over them – why is this an anti-pattern?
- Execute command containing quotes from shell variable [duplicate]
- What does “export” do in shell programming? [duplicate]
- What is the most elegant way to remove a path from the $PATH variable in Bash?
- pipe stdout and stderr to two different processes in shell script?
- Why equal to operator does not work if it is not surrounded by space?
- How can I convert tabs to spaces in every file of a directory?
- How to match a single quote in sed
- Subtract two variables in Bash