Article 6NXYA curl of a webpage, how to pick out 2 line's data I need?

curl of a webpage, how to pick out 2 line's data I need?

by
Basher52
from LinuxQuestions.org on (#6NXYA)
This is a sample of the input
Code:
<tr id="emoji-1f46c" class="">
<td class="preview">
<a class="emoji" href="#emoji-modal" title="U+1F46C"><span class="emoji"></span></a>
</td>
<td class="preview theme-apple">
<a class="emoji sprite sprite-1f46c" href="#emoji-modal" title="U+1F46C">
<img class="emoji" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-apple/1f46c.png" />
</a>
</td>
<td class="preview theme-android">
<a class="emoji" href="#emoji-modal" title="U+1F46C"><span class="emoji android"></span></a>
</td>
<td class="preview theme-android">
<a class="emoji sprite sprite-1f46c" href="#emoji-modal" title="U+1F46C">
<img class="emoji android" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-android/1f46c.png" />
</a>
</td>
<td class="preview theme-symbola">
<a class="emoji" href="#emoji-modal" title="U+1F46C"><span class="emoji symbola"></span></a>
</td>
<td class="preview theme-twitter">
<a class="emoji sprite sprite-1f46c" href="#emoji-modal" title="U+1F46C">
<img class="emoji twitter" data-src="https://abs.twimg.com/emoji/v1/72x72/1f46c.png" />
</a>
</td>
<td class="code">
<a href="/unicode/inspect/hex/1F46C">U+1F46C</a>
</td>
<td class="code">\xF0\x9F\x91\xAC</td>
<td class="name">TWO MEN HOLDING HANDS</td>
</tr>
<tr id="emoji-1f46d" class="">
<td class="preview">
<a class="emoji" href="#emoji-modal" title="U+1F46D"><span class="emoji"></span></a>
</td>
<td class="preview theme-apple">
<a class="emoji sprite sprite-1f46d" href="#emoji-modal" title="U+1F46D">
<img class="emoji" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-apple/1f46d.png" />
</a>
</td>
<td class="preview theme-android">
<a class="emoji" href="#emoji-modal" title="U+1F46D"><span class="emoji android"></span></a>
</td>
<td class="preview theme-android">
<a class="emoji sprite sprite-1f46d" href="#emoji-modal" title="U+1F46D">
<img class="emoji android" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-android/1f46d.png" />
</a>
</td>
<td class="preview theme-symbola">
<a class="emoji" href="#emoji-modal" title="U+1F46D"><span class="emoji symbola"></span></a>
</td>
<td class="preview theme-twitter">
<a class="emoji sprite sprite-1f46d" href="#emoji-modal" title="U+1F46D">
<img class="emoji twitter" data-src="https://abs.twimg.com/emoji/v1/72x72/1f46d.png" />
</a>
</td>
<td class="code">
<a href="/unicode/inspect/hex/1F46D">U+1F46D</a>
</td>
<td class="code">\xF0\x9F\x91\xAD</td>
<td class="name">TWO WOMEN HOLDING HANDS</td>
</tr>
<tr id="emoji-1f4ad" class="">
<td class="preview">
<a class="emoji" href="#emoji-modal" title="U+1F4AD"><span class="emoji"></span></a>
</td>
<td class="preview theme-apple">
<a class="emoji sprite sprite-1f4ad" href="#emoji-modal" title="U+1F4AD">
<img class="emoji" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-apple/1f4ad.png" />
</a>
</td>
<td class="preview theme-android">
<a class="emoji" href="#emoji-modal" title="U+1F4AD"><span class="emoji android"></span></a>
</td>
<td class="preview theme-android">
<a class="emoji sprite sprite-1f4ad" href="#emoji-modal" title="U+1F4AD">
<img class="emoji android" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-android/1f4ad.png" />
</a>
</td>
<td class="preview theme-symbola">
<a class="emoji" href="#emoji-modal" title="U+1F4AD"><span class="emoji symbola"></span></a>
</td>
<td class="preview theme-twitter">
<a class="emoji sprite sprite-1f4ad" href="#emoji-modal" title="U+1F4AD">
<img class="emoji twitter" data-src="https://abs.twimg.com/emoji/v1/72x72/1f4ad.png" />
</a>
</td>
<td class="code">
<a href="/unicode/inspect/hex/1F4AD">U+1F4AD</a>
</td>
<td class="code">\xF0\x9F\x92\xAD</td>
<td class="name">THOUGHT BALLOON</td>
</tr>
<tr id="emoji-1f4b6" class="">
<td class="preview">
<a class="emoji" href="#emoji-modal" title="U+1F4B6"><span class="emoji"></span></a>
</td>
<td class="preview theme-apple">
<a class="emoji sprite sprite-1f4b6" href="#emoji-modal" title="U+1F4B6">
<img class="emoji" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-apple/1f4b6.png" />
</a>
</td>
<td class="preview theme-android">
<a class="emoji" href="#emoji-modal" title="U+1F4B6"><span class="emoji android"></span></a>
</td>
<td class="preview theme-android">
<a class="emoji sprite sprite-1f4b6" href="#emoji-modal" title="U+1F4B6">
<img class="emoji android" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-android/1f4b6.png" />
</a>
</td>
<td class="preview theme-symbola">
<a class="emoji" href="#emoji-modal" title="U+1F4B6"><span class="emoji symbola"></span></a>
</td>
<td class="preview theme-twitter">
<a class="emoji sprite sprite-1f4b6" href="#emoji-modal" title="U+1F4B6">
<img class="emoji twitter" data-src="https://abs.twimg.com/emoji/v1/72x72/1f4b6.png" />
</a>
</td>
<td class="code">
<a href="/unicode/inspect/hex/1F4B6">U+1F4B6</a>
</td>
<td class="code">\xF0\x9F\x92\xB6</td>
<td class="name">BANKNOTE WITH EURO SIGN</td>
</tr>
<tr id="emoji-1f4b7" class="">
<td class="preview">
<a class="emoji" href="#emoji-modal" title="U+1F4B7"><span class="emoji"></span></a>
</td>
<td class="preview theme-apple">
<a class="emoji sprite sprite-1f4b7" href="#emoji-modal" title="U+1F4B7">
<img class="emoji" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-apple/1f4b7.png" />
</a>
</td>
<td class="preview theme-android">
<a class="emoji" href="#emoji-modal" title="U+1F4B7"><span class="emoji android"></span></a>
</td>
<td class="preview theme-android">
<a class="emoji sprite sprite-1f4b7" href="#emoji-modal" title="U+1F4B7">
<img class="emoji android" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-android/1f4b7.png" />
</a>
</td>
<td class="preview theme-symbola">
<a class="emoji" href="#emoji-modal" title="U+1F4B7"><span class="emoji symbola"></span></a>
</td>
<td class="preview theme-twitter">
<a class="emoji sprite sprite-1f4b7" href="#emoji-modal" title="U+1F4B7">
<img class="emoji twitter" data-src="https://abs.twimg.com/emoji/v1/72x72/1f4b7.png" />
</a>
</td>
<td class="code">
<a href="/unicode/inspect/hex/1F4B7">U+1F4B7</a>
</td>
<td class="code">\xF0\x9F\x92\xB7</td>
<td class="name">BANKNOTE WITH POUND SIGN</td>
</tr>
<tr id="emoji-1f4ec" class="">
<td class="preview">
<a class="emoji" href="#emoji-modal" title="U+1F4EC"><span class="emoji"></span></a>
</td>
<td class="preview theme-apple">
<a class="emoji sprite sprite-1f4ec" href="#emoji-modal" title="U+1F4EC">
<img class="emoji" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-apple/1f4ec.png" />
</a>
</td>
<td class="preview theme-android">
<a class="emoji" href="#emoji-modal" title="U+1F4EC"><span class="emoji android"></span></a>
</td>
<td class="preview theme-android">
<a class="emoji sprite sprite-1f4ec" href="#emoji-modal" title="U+1F4EC">
<img class="emoji android" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-android/1f4ec.png" />
</a>
</td>
<td class="preview theme-symbola">
<a class="emoji" href="#emoji-modal" title="U+1F4EC"><span class="emoji symbola"></span></a>
</td>
<td class="preview theme-twitter">
<a class="emoji sprite sprite-1f4ec" href="#emoji-modal" title="U+1F4EC">
<img class="emoji twitter" data-src="https://abs.twimg.com/emoji/v1/72x72/1f4ec.png" />
</a>
</td>
<td class="code">
<a href="/unicode/inspect/hex/1F4EC">U+1F4EC</a>
</td>
<td class="code">\xF0\x9F\x93\xAC</td>
<td class="name">OPEN MAILBOX WITH RAISED FLAG</td>
</tr>
<tr id="emoji-1f4ed" class="">
<td class="preview">
<a class="emoji" href="#emoji-modal" title="U+1F4ED"><span class="emoji"></span></a>
</td>
<td class="preview theme-apple">
<a class="emoji sprite sprite-1f4ed" href="#emoji-modal" title="U+1F4ED">
<img class="emoji" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-apple/1f4ed.png" />
</a>
</td>
<td class="preview theme-android">
<a class="emoji" href="#emoji-modal" title="U+1F4ED"><span class="emoji android"></span></a>
</td>
<td class="preview theme-android">
<a class="emoji sprite sprite-1f4ed" href="#emoji-modal" title="U+1F4ED">
<img class="emoji android" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-android/1f4ed.png" />
</a>
</td>
<td class="preview theme-symbola">
<a class="emoji" href="#emoji-modal" title="U+1F4ED"><span class="emoji symbola"></span></a>
</td>
<td class="preview theme-twitter">
<a class="emoji sprite sprite-1f4ed" href="#emoji-modal" title="U+1F4ED">
<img class="emoji twitter" data-src="https://abs.twimg.com/emoji/v1/72x72/1f4ed.png" />
</a>
</td>
<td class="code">
<a href="/unicode/inspect/hex/1F4ED">U+1F4ED</a>
</td>
<td class="code">\xF0\x9F\x93\xAD</td>
<td class="name">OPEN MAILBOX WITH LOWERED FLAG</td>
</tr>
<tr id="emoji-1f4ef" class="">
<td class="preview">
<a class="emoji" href="#emoji-modal" title="U+1F4EF"><span class="emoji"></span></a>
</td>
<td class="preview theme-apple">
<a class="emoji sprite sprite-1f4ef" href="#emoji-modal" title="U+1F4EF">
<img class="emoji" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-apple/1f4ef.png" />
</a>
</td>
<td class="preview theme-android">
<a class="emoji" href="#emoji-modal" title="U+1F4EF"><span class="emoji android"></span></a>
</td>
<td class="preview theme-android">
<a class="emoji sprite sprite-1f4ef" href="#emoji-modal" title="U+1F4EF">
<img class="emoji android" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-android/1f4ef.png" />
</a>
</td>
<td class="preview theme-symbola">
<a class="emoji" href="#emoji-modal" title="U+1F4EF"><span class="emoji symbola"></span></a>
</td>
<td class="preview theme-twitter">
<a class="emoji sprite sprite-1f4ef" href="#emoji-modal" title="U+1F4EF">
<img class="emoji twitter" data-src="https://abs.twimg.com/emoji/v1/72x72/1f4ef.png" />
</a>
</td>
<td class="code">
<a href="/unicode/inspect/hex/1F4EF">U+1F4EF</a>
</td>
<td class="code">\xF0\x9F\x93\xAF</td>
<td class="name">POSTAL HORN</td>
</tr>
<tr id="emoji-1f4f5" class="">
<td class="preview">
<a class="emoji" href="#emoji-modal" title="U+1F4F5"><span class="emoji"></span></a>
</td>
<td class="preview theme-apple">
<a class="emoji sprite sprite-1f4f5" href="#emoji-modal" title="U+1F4F5">
<img class="emoji" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-apple/1f4f5.png" />
</a>
</td>
<td class="preview theme-android">
<a class="emoji" href="#emoji-modal" title="U+1F4F5"><span class="emoji android"></span></a>
</td>
<td class="preview theme-android">
<a class="emoji sprite sprite-1f4f5" href="#emoji-modal" title="U+1F4F5">
<img class="emoji android" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-android/1f4f5.png" />
</a>
</td>
<td class="preview theme-symbola">
<a class="emoji" href="#emoji-modal" title="U+1F4F5"><span class="emoji symbola"></span></a>
</td>
<td class="preview theme-twitter">
<a class="emoji sprite sprite-1f4f5" href="#emoji-modal" title="U+1F4F5">
<img class="emoji twitter" data-src="https://abs.twimg.com/emoji/v1/72x72/1f4f5.png" />
</a>
</td>
<td class="code">
<a href="/unicode/inspect/hex/1F4F5">U+1F4F5</a>
</td>
<td class="code">\xF0\x9F\x93\xB5</td>
<td class="name">NO MOBILE PHONES</td>
</tr>
<tr id="emoji-1f500" class="">
<td class="preview">
<a class="emoji" href="#emoji-modal" title="U+1F500"><span class="emoji"></span></a>
</td>
<td class="preview theme-apple">
<a class="emoji sprite sprite-1f500" href="#emoji-modal" title="U+1F500">
<img class="emoji" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-apple/1f500.png" />
</a>
</td>
<td class="preview theme-android">
<a class="emoji" href="#emoji-modal" title="U+1F500"><span class="emoji android"></span></a>
</td>
<td class="preview theme-android">
<a class="emoji sprite sprite-1f500" href="#emoji-modal" title="U+1F500">
<img class="emoji android" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-android/1f500.png" />
</a>
</td>
<td class="preview theme-symbola">
<a class="emoji" href="#emoji-modal" title="U+1F500"><span class="emoji symbola"></span></a>
</td>
<td class="preview theme-twitter">
<a class="emoji sprite sprite-1f500" href="#emoji-modal" title="U+1F500">
<img class="emoji twitter" data-src="https://abs.twimg.com/emoji/v1/72x72/1f500.png" />
</a>
</td>
<td class="code">
<a href="/unicode/inspect/hex/1F500">U+1F500</a>
</td>
<td class="code">\xF0\x9F\x94\x80</td>
<td class="name">TWISTED RIGHTWARDS ARROWS</td>
</tr>
<tr id="emoji-1f501" class="">
<td class="preview">
<a class="emoji" href="#emoji-modal" title="U+1F501"><span class="emoji"></span></a>
</td>
<td class="preview theme-apple">
<a class="emoji sprite sprite-1f501" href="#emoji-modal" title="U+1F501">
<img class="emoji" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-apple/1f501.png" />
</a>
</td>
<td class="preview theme-android">
<a class="emoji" href="#emoji-modal" title="U+1F501"><span class="emoji android"></span></a>
</td>
<td class="preview theme-android">
<a class="emoji sprite sprite-1f501" href="#emoji-modal" title="U+1F501">
<img class="emoji android" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-android/1f501.png" />
</a>
</td>
<td class="preview theme-symbola">
<a class="emoji" href="#emoji-modal" title="U+1F501"><span class="emoji symbola"></span></a>
</td>
<td class="preview theme-twitter">
<a class="emoji sprite sprite-1f501" href="#emoji-modal" title="U+1F501">
<img class="emoji twitter" data-src="https://abs.twimg.com/emoji/v1/72x72/1f501.png" />
</a>
</td>
<td class="code">
<a href="/unicode/inspect/hex/1F501">U+1F501</a>
</td>
<td class="code">\xF0\x9F\x94\x81</td>
<td class="name">CLOCKWISE RIGHTWARDS AND LEFTWARDS OPEN CIRCLE ARROWS</td>
</tr>
<tr id="emoji-1f502" class="">
<td class="preview">
<a class="emoji" href="#emoji-modal" title="U+1F502"><span class="emoji"></span></a>
</td>
<td class="preview theme-apple">
<a class="emoji sprite sprite-1f502" href="#emoji-modal" title="U+1F502">
<img class="emoji" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-apple/1f502.png" />
</a>
</td>
<td class="preview theme-android">
<a class="emoji" href="#emoji-modal" title="U+1F502"><span class="emoji android"></span></a>
</td>
<td class="preview theme-android">
<a class="emoji sprite sprite-1f502" href="#emoji-modal" title="U+1F502">
<img class="emoji android" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-android/1f502.png" />
</a>
</td>
<td class="preview theme-symbola">
<a class="emoji" href="#emoji-modal" title="U+1F502"><span class="emoji symbola"></span></a>
</td>
<td class="preview theme-twitter">
<a class="emoji sprite sprite-1f502" href="#emoji-modal" title="U+1F502">
<img class="emoji twitter" data-src="https://abs.twimg.com/emoji/v1/72x72/1f502.png" />
</a>
</td>
<td class="code">
<a href="/unicode/inspect/hex/1F502">U+1F502</a>
</td>
<td class="code">\xF0\x9F\x94\x82</td>
<td class="name">CLOCKWISE RIGHTWARDS AND LEFTWARDS OPEN CIRCLE ARROWS WITH CIRCLED ONE OVERLAY</td>
</tr>
<tr id="emoji-1f504" class="">
<td class="preview">
<a class="emoji" href="#emoji-modal" title="U+1F504"><span class="emoji"></span></a>
</td>
<td class="preview theme-apple">
<a class="emoji sprite sprite-1f504" href="#emoji-modal" title="U+1F504">
<img class="emoji" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-apple/1f504.png" />
</a>
</td>
<td class="preview theme-android">
<a class="emoji" href="#emoji-modal" title="U+1F504"><span class="emoji android"></span></a>
</td>
<td class="preview theme-android">
<a class="emoji sprite sprite-1f504" href="#emoji-modal" title="U+1F504">
<img class="emoji android" data-src="//de9xxjhuq2c2j.cloudfront.net/apps/live-20231204-1/images/emoji/emoji-android/1f504.png" />
</a>
</td>
<td class="preview theme-symbola">
<a class="emoji" href="#emoji-modal" title="U+1F504"><span class="emoji symbola"></span></a>
</td>
<td class="preview theme-twitter">
<a class="emoji sprite sprite-1f504" href="#emoji-modal" title="U+1F504">
<img class="emoji twitter" data-src="https://abs.twimg.com/emoji/v1/72x72/1f504.png" />
</a>
</td>
<td class="code">
<a href="/unicode/inspect/hex/1F504">U+1F504</a>
</td>
<td class="code">\xF0\x9F\x94\x84</td>
<td class="name">ANTICLOCKWISE DOWNWARDS AND UPWARDS OPEN CIRCLE ARROWS</td>
</tr>what I need is these lines, or data even;

Code:<td class="code">\xF0\x9F\x93\xB5</td>
<td class="name">NO MOBILE PHONES</td>(example so not the exact same 'code' as I wrote, need all lines from this file

The info I need from this is:
The UTF-8 code and the next line's 'name' so I know what the UTF-8 code is supposed to be.
Preferably in the order of name first then the UTF-8 code but on the same line 'cos THIS I can handle with grep,sed,awk.

Not even close to know awk good enuf so fix this so I need help for this (wish I did though). If you get me a fix or this, also please gimme an explanation of it so I hopefully won't get back here again for something like it :p
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments