1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-05 00:07:51 +02:00

Exit with status from `id' command.

Don't print `$name : $groups' if id fails.
Reported by Austin Donnelly.
This commit is contained in:
Jim Meyering
1997-07-16 12:49:36 +00:00
parent f46c35a744
commit 74ed7c9f94
+5 -1
View File
@@ -46,8 +46,12 @@ esac
if [ $# -eq 0 ]; then
id -Gn
status=$?
else
for name in "$@"; do
echo $name : `id -Gn -- $name`
groups=`id -Gn -- $name`
status=$?
test $status = 0 && echo $name : $groups
done
fi
exit $status