Skip to content

Instantly share code, notes, and snippets.

@noise
Created January 5, 2015 16:02
Show Gist options
  • Save noise/3f856c8b06a0dc544e79 to your computer and use it in GitHub Desktop.
Save noise/3f856c8b06a0dc544e79 to your computer and use it in GitHub Desktop.
multi-column juju status output
#!/bin/bash
COLUMNS=${COLUMNS:-$(tput cols)}
LINES=${LINES:-$(tput lines)}
if [[ ${COLUMNS} -lt 110 ]]; then
C=2
else
C=3
fi
juju status | pr --columns=${C} -T -W ${COLUMNS}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment