Skip to content

Instantly share code, notes, and snippets.

@pepoviola
Last active April 4, 2024 03:56
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save pepoviola/6c524769ecbcd15039fe to your computer and use it in GitHub Desktop.
Save pepoviola/6c524769ecbcd15039fe 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
@jwtracy
Copy link

jwtracy commented Feb 4, 2022

Thanks!

@RemyNtshaykolo
Copy link

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment