[CentOS] Slightly OT: check creation of a group
Niki Kovacs
contact at kikinovak.netMon Mar 1 16:03:46 UTC 2010
- Previous message: [CentOS] cron mystery
- Next message: [CentOS] Slightly OT: check creation of a group
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, I'm currently writing an install script for an application, and my already limited Bash skills are a bit rusty. I want to check if a group exists, and if it doesn't, then create it. Only thing I found is: if [ grep medintux /etc/group ]; then continue else groupadd medintux fi Apparently I can't seem to "negate" the test, e. g. something like if !(grep medintux /etc/group) Any suggestions for the correct syntax here ? Thanks, Niki
- Previous message: [CentOS] cron mystery
- Next message: [CentOS] Slightly OT: check creation of a group
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list