Made some minor updates to the UI for (imo) better formatting

This commit is contained in:
Kevin MacMartin 2014-08-08 12:36:29 -04:00
parent 8687f3ea70
commit 171223a3ed

View file

@ -17,23 +17,22 @@ fi
# usage info
function usage()
{
echo "Usage: $progname [options] term1 [term2] ... [termN]"
echo "Usage : $progname [OPTIONS] term1 [term2] ... [termN]"
echo "Example: $progname oracle windows local"
echo
echo "======="
echo "Options"
echo "======="
echo
echo " -c Perform case-sensitive searches; by default, searches will"
echo " try to be greedy"
echo " -h, --help Show help screen"
echo " -v By setting verbose output, description lines are allowed to"
echo " overflow their columns"
echo "========="
echo " OPTIONS "
echo "========="
echo " -c - Perform case-sensitive searches; by default,"
echo " searches will try to be greedy"
echo " -v - By setting verbose output, description lines"
echo " are allowed to overflow their columns"
echo " -h, --help - Show help screen"
echo
echo "*NOTES*"
echo "Use any number of search terms you would like (minimum of one)."
echo "Search terms are not case sensitive, and order is irrelevant."
exit 1
echo "NOTES:"
echo " - Use any number of search terms you would like (minimum: 1)"
echo " - Search terms are not case sensitive, and order is irrelevant"
exit 0
}
# dynamically set column widths
@ -74,10 +73,13 @@ while getopts "chv" arg $ARGS; do
done
# print header
printf "%-${COL1}s %s" " Description"
echo " Path"
printf "%0.s-" `eval echo {1..$(( $COL1 + 1 ))}`
echo -n " "
echo -n "|"
printf "%0.s-" `eval echo {1..$(( $COL2 - 1 ))}`
printf "%-${COL1}s |%s" " Description"
echo " Path"
printf "%0.s-" `eval echo {1..$(( $COL1 + 1 ))}`
echo -n "|"
printf "%0.s-" `eval echo {1..$(( $COL2 - 1 ))}`
echo
@ -104,4 +106,9 @@ fi
| awk -F "\"*,\"*" '{ printf "%-'$FORMAT's | %s\n", $3, $2}' \
| sed " s/| platforms/| /" \
| eval $SEARCH
printf "%0.s-" `eval echo {1..$(( $COL1 + 1 ))}`
echo -n "|"
printf "%0.s-" `eval echo {1..$(( $COL2 - 1 ))}`
exit 0