projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f46c35a
)
Exit with status from `id' command.
author
Jim Meyering
<jim@meyering.net>
Wed, 16 Jul 1997 12:49:36 +0000
(12:49 +0000)
committer
Jim Meyering
<jim@meyering.net>
Wed, 16 Jul 1997 12:49:36 +0000
(12:49 +0000)
Don't print `$name : $groups' if id fails.
Reported by Austin Donnelly.
src/groups.sh
patch
|
blob
|
history
diff --git
a/src/groups.sh
b/src/groups.sh
index d115d2a77fd80135f2bb6cf3782a00fbf383343c..508e95a18c4cd45650c20456241bd3029028603d 100755
(executable)
--- a/
src/groups.sh
+++ b/
src/groups.sh
@@
-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