I'm using curl to get the below output but only want to get the output from in between the <LocalityName></LocalityName> tags. I can wittle it down using nawk 'NR==10' but would prefer using sed or similar, can anyone help?

Hi,I'm sure there's a more elegant way to do this but this is the first thing that popped into my head and it should get the job done for now. In a nutshell, the grep statement below grabs only the lines that contain "<LocalityName>" and then that output is piped into sed, which deletes everything from the beginning of the line (^) to "<LocalityName>" and then from "</LocalityName>" (in which the "/" is escaped by preceding it with a "\") to the end of the line.

Who is online

Users browsing this forum: No registered users and 25 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum