From 858cf068305e58a918ad60cc0337b8dc13e75cf5 Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Mon, 15 Nov 2021 09:03:07 +0100 Subject: used_free_uidgids.sh: Make the recommended IDs stand out MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By moving this output to the end and adding some colour. Signed-off-by: Ulrich Müller --- bin/used_free_uidgids.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/used_free_uidgids.sh b/bin/used_free_uidgids.sh index 1838f116..dae25178 100755 --- a/bin/used_free_uidgids.sh +++ b/bin/used_free_uidgids.sh @@ -305,9 +305,14 @@ for r in "${selection_ranges[@]}"; do (( free_total_pair += freepair )) done -echo "Recommended GID only: ${gidonly:-${uidgidboth:-none}}" -echo "Recommended UID only: ${uidonly:=${uidgidboth:-none}}" -echo "Recommended UID+GID pair: ${uidgidboth:-none}" echo "Free UIDs: ${free_total_uid}" echo "Free GIDs: ${free_total_gid}" echo "Free UID+GID pairs: ${free_total_pair}" +echo + +for out in "Recommended GID only: ${gidonly:-${uidgidboth:-none}}" \ + "Recommended UID only: ${uidonly:-${uidgidboth:-none}}" \ + "Recommended UID+GID pair: ${uidgidboth:-none}"; do + [[ ${out} == *none ]] && colour=${colour_USED} || colour=${colour_FREE} + echo -e "${out%%: *}: ${colour}${out#*: }${colour_RESET}" +done -- cgit v1.2.3-65-gdbad