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:
+5
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user