User delete & search!

Taking care of your Linux box.

User delete & search!

Postby telenor » Wed Jun 10, 2009 1:15 pm

AOA,

I want a script for user delete & search from the file.



The file format is:

zia.ali zia.ali@mydomain.com
saleem.khans saleem.khan@mydomain.com
abdul.ghani abdul.ghani@mydomain.com
adnan.siddiqui adnan.siddiqui@mydomain.com
telenor
Havaldaar
 
Posts: 104
Joined: Tue Mar 29, 2005 11:08 am

Postby shahzor » Sat Jul 25, 2009 2:56 pm

but why you need an script for it what do you want to do please provide a bit of description.
LinuxBoy
shahzor
Naik
 
Posts: 72
Joined: Thu Jun 29, 2006 11:33 am
ICQ: 000
WLM: none
Yahoo Messenger: shahzor007@yahoo.com
AOL: none
Location: Quetta

Postby ranatanveer » Thu Jul 30, 2009 5:24 am

I want a script for user delete & search from the file.


learn sed http://www.grymoire.com/Unix/Sed.html
Regards

Rana Tanveer
+923224194457
Linux Student

For Affordable Web Development http://www.affordableprogrammers.com
http://www.qualityprogrammers.com
ranatanveer
Subedar
 
Posts: 355
Joined: Sat May 07, 2005 11:54 am
ICQ: 133032001
Website: http://www.affordableprogrammers.com
WLM: ranatanveer@gmail.com
Yahoo Messenger: ranahard@yahoo.com
Location: Lahore

Postby lambda » Thu Jul 30, 2009 8:45 am

sed won't help here. awk, perl, python, ruby, or even plain old /bin/sh will.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
lambda
Major General
 
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Website: http://www.hungry.com/~fn/
Location: Lahore

Re:

Postby LinuxFreaK » Thu Jul 30, 2009 8:06 pm

Dear ranatanveer,
Salam,

lambda wrote:sed won't help here. awk, perl, python, ruby, or even plain old /bin/sh will.


Indeed. I totally agree with lambda.

telenor, If you try to search at Porgamming Section of Linux Pakistan, I am sure you will find solution as lambda have given this task to Linux Pakistan Forum Members.

Best Regards.
Farrukh Ahmed
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
ICQ: 82075802
Website: http://www.linuxpakistan.net/wiki/index.php?pagename=LinuxFreak
WLM: f4fahmed@hotmail.com
Yahoo Messenger: f4fahmed@yahoo.com
AOL: linuxpakistan@aol.com
Location: Karachi

Postby ranatanveer » Thu Jul 30, 2009 11:57 pm

Wa Alaikum Salam, LinuxFreak

I don't want to argue with you and lambda, i always respect you from my hear, because i have learned a lot from both of you.

but here i want to share that, i only know bash awk and sed and a little perl, and i am capable to do anything i want to do.

so the request of telenor:
I want a script for user delete & search from the file.


this work can be done simply with 1 line sed (if meaning of telenor saying is same :D ), as sed has both search and replace/delete patterns. (moreover sed and awk has many more capabilities which are unknown to me :lol: )
Regards

Rana Tanveer
+923224194457
Linux Student

For Affordable Web Development http://www.affordableprogrammers.com
http://www.qualityprogrammers.com
ranatanveer
Subedar
 
Posts: 355
Joined: Sat May 07, 2005 11:54 am
ICQ: 133032001
Website: http://www.affordableprogrammers.com
WLM: ranatanveer@gmail.com
Yahoo Messenger: ranahard@yahoo.com
Location: Lahore


Return to “%s” Administration

Who is online

Users browsing this forum: No registered users and 2 guests

cron