Need help getting specific info out of a file

Reply

Join Date: Jul 2004
Posts: 1
Reputation: mneumann is an unknown quantity at this point 
Solved Threads: 0
mneumann mneumann is offline Offline
Newbie Poster

Need help getting specific info out of a file

 
0
  #1
Jul 21st, 2004
Hi there. I'd really appreciate some help! We are scrapping our old email server, but some mail is still routed through it. I have a log that is written containing information on what other servers are routing through here and I need to get that information out of the log so that we can re-route it through the new server. For example part of the log reads "Received from thisserver.old.old.old by newserver.new.new.new" and then the log goes on. The information I need is 'thisserver.old.old.old", but I'm going to need grep on 'newserver.new.new.new'. Hopefully I'm making sense, but can anyone help me??

THanks!
Reply With Quote Quick reply to this message  
Join Date: Dec 2003
Posts: 2,414
Reputation: alc6379 has a spectacular aura about alc6379 has a spectacular aura about alc6379 has a spectacular aura about 
Solved Threads: 123
Team Colleague
alc6379's Avatar
alc6379 alc6379 is offline Offline
Cookie... That's it

Re: Need help getting specific info out of a file

 
0
  #2
Jul 21st, 2004
I'm a little confused... What are you greping on 'newserver.new.new.new'?

I'm sure there's some way you could use awk or sed and create a regexp that includes the line that you're looking for, or just use grep to pull out the entire line. I'm not an expert at parsing text, but I hope my suggestion helps.
Alex Cavnar, aka alc6379
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the *nix Software Forum
Thread Tools Search this Thread



Tag cloud for *nix Software
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC