diff --git a/tools/log-bosh.sh b/tools/log-bosh.sh index 4f7041a..be9ad66 100755 --- a/tools/log-bosh.sh +++ b/tools/log-bosh.sh @@ -118,7 +118,7 @@ if [ ${flagError} = 0 ] ; then #--- Display selected bosh deployment status if [ ${flagError} = 0 ] ; then if [ ${flag_interactive} = 1 ] ; then - deployments=$(bosh deployments --column=Name | grep -vE "^Name$|^Succeeded$|^[0-9]* deployments$") + deployments="$(bosh deployments --json | jq -r '.Tables[].Rows[].name' | pr -3t -W 130)" printf "\n%bSelect a specific deployment in the list, or suffix your bosh commands with -d :%b\n%s" "${REVERSE}${GREEN}" "${STD}" "${deployments}" printf "\n\n%bYour choice ( to select all) :%b " "${GREEN}${BOLD}" "${STD}" ; read BOSH_DEPLOYMENT diff --git a/tools/switch.sh b/tools/switch.sh index d824f0a..22a194d 100755 --- a/tools/switch.sh +++ b/tools/switch.sh @@ -8,7 +8,7 @@ if [ $? != 0 ] ; then printf "\n\n%bERROR : You are not connected to bosh director.%b\n\n" "${RED}" "${STD}" else #--- Select specific deployment (BOSH_DEPLOYMENT variable) - deployments=$(bosh deployments --column=Name | grep -vE "^Name$|^Succeeded$|^[0-9]* deployments$") + deployments="$(bosh deployments --json | jq -r '.Tables[].Rows[].name' | pr -3t -W 130)" if [ "$1" != "" ] ; then flag=$(echo "${deployments}" | grep "$1") if [ "${flag}" = "" ] ; then