summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2021-11-15 09:03:07 +0100
committerUlrich Müller <ulm@gentoo.org>2021-11-15 14:46:19 +0100
commit858cf068305e58a918ad60cc0337b8dc13e75cf5 (patch)
treed31e191cea1a74aa14bf10660bc9050edbfaabdc /bin
parentuid-gid.txt: Fix GID for uucp (66) (diff)
downloadapi-858cf068305e58a918ad60cc0337b8dc13e75cf5.tar.gz
api-858cf068305e58a918ad60cc0337b8dc13e75cf5.tar.bz2
api-858cf068305e58a918ad60cc0337b8dc13e75cf5.zip
used_free_uidgids.sh: Make the recommended IDs stand out
By moving this output to the end and adding some colour. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/used_free_uidgids.sh11
1 files changed, 8 insertions, 3 deletions
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