Results 1 to 3 of 3
Hi everyone,
I was looking for some code to check wheter a group exists or not in shell.
Without going throug the entire /etc/group file.
For users i found this:
...
- 12-05-2009 #1Just Joined!
- Join Date
- Dec 2009
- Posts
- 2
Linux Shell Group exists
Hi everyone,
I was looking for some code to check wheter a group exists or not in shell.
Without going throug the entire /etc/group file.
For users i found this:
Code:if id USERID > /dev/null 2>&1 then echo "User exists" else echo "User non existant." fi
- 12-06-2009 #2Just Joined!
- Join Date
- Jul 2009
- Location
- Chicago, IL
- Posts
- 9
Is there an issue with going though the etc/group file? Everything I dug up uses it.
- 12-17-2009 #3Just Joined!
- Join Date
- May 2006
- Posts
- 4


Reply With Quote
