Skip to content

Instantly share code, notes, and snippets.

@thinkerbot
Created July 5, 2013 16:43
Show Gist options
  • Save thinkerbot/5935753 to your computer and use it in GitHub Desktop.
Save thinkerbot/5935753 to your computer and use it in GitHub Desktop.
Variations of using a HEREDOC with a pipe and multiline strings
sed -e 's/a/A/' <<DOC | sed -e "\
s/b/B/
"
abc
DOC
(sed -e 's/a/A/' | sed -e "\
s/b/B/
") <<DOC
abc
DOC
(sed -e 's/a/A/' <<DOC
abc
DOC
) | sed -e "\
s/b/B/
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment