Advertisement
Guest User

Untitled

a guest
Mar 29th, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.48 KB | None | 0 0
  1. ~ $ cat test
  2. This is just a test to parse multiple links in one line of text, ala <a href="http://www.ipdb.org/machine.cgi?gid=3788&amp;puid=34561">10th Inning</a><a href="http://www.ipdb.org/machine.cgi?gid=3788&amp;puid=34561">10th Inning</a><a href="http://www.ipdb.org/machine.cgi?gid=3788&amp;puid=34561">10th Inning</a>with some trailing garbage
  3.  
  4. ~ $ sed 's|<a|\'$'\n<a|g' <test | grep puid=34561 | awk 'BEGIN { FS="<|>" } ; { print $3 }'
  5. 10th Inning
  6. 10th Inning
  7. 10th Inning
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement