On Sat, May 04, 2002 at 12:40:35AM -0700, Mike Egglestone wrote:
> I would like to add some users to a group in batch format.
> Something along these lines:
>
> adduser `awk F: '&3 >= 1000 {print $1}' /etc/passwd` groupname
Something more like this would work:
for x in `awk -F: '$3 >= 1000 {print $1}' /etc/passwd`; do adduser $x
groupname; done
... or:
awk -F: '$3 >= 1000 {print $1}' /etc/passwd | xargs -iUSER adduser USER
groupname
--
Colin Watson [EMAIL PROTECTED]
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]