Would

if ($_ =~ /^$username/   &&   $_ =~ /:.*:45:/) {print "*".$_;}

work?

----- Original Message ----- 
From: "Daniel Falkenberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 08, 2001 4:39 PM
Subject: /etc/passwd problem


Hey all,

I have a script here that I want to be able to add a * next to all the
users in that I want with the UID of 45 in /etc/passwd.

Example...

test:x:530:45:Test Name:/home/test:/bin/false
test2:x:531:45:Test Name2:/home/test2:/bin/false

I want...

*test:x:530:45:Test Name:/home/test:/bin/false  <--- With the *
test2:x:531:45:Test Name2:/home/test2:/bin/false

All I want to be able to do is use STDIN for the user to input the
username they want to add a star next to and then do it but only for
users with a UID of 45.

Any ideas ont this one?

Regards,

Dan


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to