Skip to content

Instantly share code, notes, and snippets.

@herrbischoff
Created April 21, 2015 17:07
Show Gist options
  • Save herrbischoff/fe2120d1ed88539afa0f to your computer and use it in GitHub Desktop.
Save herrbischoff/fe2120d1ed88539afa0f to your computer and use it in GitHub Desktop.
Multiline sed replace
sed -n '1h;1!H;${g;s/search/replace/;p;}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment