Created
March 7, 2019 07:19
-
-
Save stknohg/20d808ed2a85ef84a60c5c22455279b3 to your computer and use it in GitHub Desktop.
AWS CLIすべてのサブコマンドを列挙するスクリプト
This file contains hidden or 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 characters
#!/bin/bash | |
for c in $(aws list-commands 2>&1 | tail -n +9 | awk -F'|' '{printf "%s\n%s\n",$1,$2}' | tr -d ' ') | |
do | |
# wait, help,空白 は除外 | |
eval "aws $c list-commands" 2>&1 | tail -n +9 | awk -F'|' '{printf "%s\n%s\n",$1,$2}' | tr -d ' ' | sed -e /wait/d -e /help/d -e /^$/d | awk -v "v1=$c" '{printf "aws %s %s\n",v1,$0}' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment