Improve FreeBSD compatibility

This commit is contained in:
tlimoncelli@stackoverflow.com
2017-05-15 07:50:30 -04:00
parent 4bc97049ab
commit 1a22f77c82
2 changed files with 2 additions and 2 deletions

View File

@@ -192,7 +192,7 @@ become_bob
# This users's default group:
DEFAULT_GID_NUM=$(id -g)
# Pick a group that is not the default group:
TEST_GID_NUM=$(id -G | fmt -1 | grep -xv "$(id -u)" | grep -xv "$(id -g)" | head -1)
TEST_GID_NUM=$(id -G | fmt -1 | sort -rn | grep -xv "$(id -u)" | grep -xv "$(id -g)" | head -1)
echo "DEFAULT_GID_NUM=$DEFAULT_GID_NUM"
echo "TEST_GID_NUM=$TEST_GID_NUM"