Skip to content

Instantly share code, notes, and snippets.

@riazul701
Forked from miguelmota/escape_double_quotes.sh
Created October 18, 2023 10:42
Show Gist options
  • Save riazul701/88b67a3c9443cd265bd5413d01a560f1 to your computer and use it in GitHub Desktop.
Save riazul701/88b67a3c9443cd265bd5413d01a560f1 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