Skip to content

Instantly share code, notes, and snippets.

@wadewegner
Created September 7, 2016 00:31
Show Gist options
  • Select an option

  • Save wadewegner/4d9c5a538d4f99da37acf69a73187810 to your computer and use it in GitHub Desktop.

Select an option

Save wadewegner/4d9c5a538d4f99da37acf69a73187810 to your computer and use it in GitHub Desktop.
#!/bin/bash
listOfCommands="addons
apps
auth
config
domains
logs
ps
releases
run
access
buildpacks
certs
drains
features
git
help
keys
labs
local
login
maintenance
members
notifications
orgs
pg
pgbackups
pipelines
plugins
redis
regions
sf
spaces
stack
status
update
version"
for topicCommand in $listOfCommands
do
bash -c "heroku $topicCommand --help > a-$topicCommand.txt"
done
for i in ./a-*.txt
do
str1="${i##*/}"
while read p; do
set -- $p
arr=(${1//:/ })
if [[ "${listOfCommands[@]}" =~ "${arr}" ]]; then
echo $1
fi
done <$str1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment