Skip to content

Instantly share code, notes, and snippets.

@prosenjit-manna
Forked from pepoviola/key_to_json
Created August 3, 2017 17:55
Show Gist options
  • Save prosenjit-manna/2e900cc255e7b63d7cf1b8dfcc0ba2e5 to your computer and use it in GitHub Desktop.
Save prosenjit-manna/2e900cc255e7b63d7cf1b8dfcc0ba2e5 to your computer and use it in GitHub Desktop.
convert new lines into \n for use ssh key in json
sed ':a;N;$!ba;s/\n/\\n/g' my_key.pem
or in vi
:%s/\n/\\n/
https://tickets.opscode.com/browse/CHEF-3540
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment