Skip to content

Instantly share code, notes, and snippets.

@flannon
Created October 17, 2019 12:39
Show Gist options
  • Save flannon/a2add941611e43af324ac6095383d3b1 to your computer and use it in GitHub Desktop.
Save flannon/a2add941611e43af324ac6095383d3b1 to your computer and use it in GitHub Desktop.
from https://stackoverflow.com/a/13360181/3447107
#Make an array, here I'm using the output from openstack
OFS=$IFS
IFS=','
PROPERTIES=($(openstack flavor show $FLAVOR -c properties -f json | jq -r '.[]'))
IFS=$OIFS
# Walk the array backwards
for (( i=${#PROPERTIES[@]}-1 ; i>=0 ; i-- )); do
oecho ${PROPERTIES[i]}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment