LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-23-2008, 06:29 AM   #1
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Rep: Reputation: 39
Question Curl and trying to evaluate output i get back


Hi All,
I'm trying to do something with output i get back with curl. What i'd love to be able to do specifically is capture all parts of output that are between <td> </td> tags in html.

For Example:-
Curl output....

<tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr><tr><td>5</td><td>6</td></tr>

Or something similar and then i'd love to somehow, return back...
1
2
3
4
5
6

OR

1|2|3|4|5|6

Just some sort of delimiter or something, not sure how to do this or even what command is best... probably some complicated awk or sed.

Any ideas?
Cheers,
MJ
 
Old 12-23-2008, 07:17 AM   #2
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Original Poster
Rep: Reputation: 39
HI All,
I've got pretty much there i think, but if there is a better way than..
Code:
sed -n '/^$/!{s/<[^>]*>/\n/g;p;}'
Please let me know
Cheers
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Could someone evaluate this error console output? jonnycando Linux - General 5 08-10-2009 08:25 PM
java xpath evaluate on a node h/w Programming 0 02-28-2008 03:47 PM
output redirect back to file mathfeel Linux - Software 1 03-21-2007 12:28 PM
Video output blanks out then comes back on ELPDave Fedora 1 03-07-2007 05:53 PM
curl scrape javascript output pld Programming 4 04-13-2005 03:52 PM


All times are GMT -5. The time now is 09:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration