Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Created January 29, 2019 11:42
Show Gist options
  • Save miguelmota/a0d37934c689f9ad000d01306905868c to your computer and use it in GitHub Desktop.
Save miguelmota/a0d37934c689f9ad000d01306905868c to your computer and use it in GitHub Desktop.
Bash sed escape double quotes
$ echo '{"foo":"bar"}'| sed s/\"/'\\\"'/g
# {\"foo\":\"bar\"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment