Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AWS CLIすべてのサブコマンドを列挙するスクリプト
#!/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
You can’t perform that action at this time.