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!

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.