943,884 Members | Top Members by Rank

Ad:
Jul 21st, 2004
0

Need help getting specific info out of a file

Expand Post »
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!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mneumann is offline Offline
1 posts
since Jul 2004
Jul 21st, 2004
0

Re: Need help getting specific info out of a file

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.
Team Colleague
Reputation Points: 186
Solved Threads: 147
Cookie... That's it
alc6379 is offline Offline
2,519 posts
since Dec 2003

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Linux Applications and Software Forum Timeline: SUSE ADSL and Network problems
Next Thread in Linux Applications and Software Forum Timeline: Yellow Dog





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC