Skip to content

Instantly share code, notes, and snippets.

@gagata
Created February 23, 2022 21:47
Show Gist options
  • Save gagata/8f6bb570c67cdc115d3aa80ad072a108 to your computer and use it in GitHub Desktop.
Save gagata/8f6bb570c67cdc115d3aa80ad072a108 to your computer and use it in GitHub Desktop.
sed -E 's/'$'\e''/\\e/g; s/'$'\a''/\\a/g; s/(["\\])/\\\1/g; s/'$'\b''/\\b/g; s/'$'\t''/\\t/g; s/'$'\f''/\\f/g; s/'$'\r''/\\r/g; $!s/$/\\n/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment