From a14d9cffddb5d01023e178d240a144c58f589f45 Mon Sep 17 00:00:00 2001 From: Christer Edwards Date: Fri, 22 Nov 2019 22:05:53 -0700 Subject: [PATCH] updating Usage output and standardizing target variable --- usr/local/share/bastille/top.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr/local/share/bastille/top.sh b/usr/local/share/bastille/top.sh index 7e016a94..39c9219c 100644 --- a/usr/local/share/bastille/top.sh +++ b/usr/local/share/bastille/top.sh @@ -31,7 +31,7 @@ . /usr/local/share/bastille/colors.pre.sh usage() { - echo -e "${COLOR_RED}Usage: bastille top [ALL|glob]'.${COLOR_RESET}" + echo -e "${COLOR_RED}Usage: bastille top TARGET${COLOR_RESET}" exit 1 } @@ -47,13 +47,14 @@ if [ $# -gt 1 ] || [ $# -lt 1 ]; then fi TARGET="${1}" +shift -if [ "$TARGET" = 'ALL' ]; then +if [ "${TARGET}" = 'ALL' ]; then JAILS=$(jls name) fi -if [ "$TARGET" != 'ALL' ]; then - JAILS=$(jls name | grep -w "${1}") +if [ "${TARGET}" != 'ALL' ]; then + JAILS=$(jls name | grep -w "${TARGET}") fi for _jail in ${JAILS}; do