954,224 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Need help getting specific info out of a file

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!

mneumann
Newbie Poster
1 post since Jul 2004
Reputation Points: 10
Solved Threads: 0
 

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.

alc6379
Cookie... That's it
Team Colleague
2,820 posts since Dec 2003
Reputation Points: 186
Solved Threads: 147
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: