Last active
October 4, 2017 21:32
Revisions
-
glarrain revised this gist
Oct 4, 2017 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,13 @@ #!/usr/bin/env bash # Tools: # - aws-cli version 1.11.143 # - jp version 0.1.3 # https://github.com/jmespath/jp # Notes: # - 'sed' pattern # https://stackoverflow.com/questions/13610639/tr-command-how-to-replace-the-string-n-with-an-actual-newline-n/13611446#13611446 aws ec2 create-key-pair --key-name 'my-key' > 'my-key.json' cat 'my-key.json' | jp 'KeyMaterial' | sed 's/\\n/\n/g' > 'my-key.pem' -
glarrain created this gist
Oct 4, 2017 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ #!/usr/bin/env bash # - aws-cli version 1.11.143 # - jp version 0.1.3 (https://github.com/jmespath/jp) aws ec2 create-key-pair --key-name 'my-key' > 'my-key.json' cat 'my-key.json' | jp 'KeyMaterial' | sed 's/\\n/\n/g' > 'my-key.pem'