View Single Post
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#102
Originally Posted by vi_ View Post
You can wget the page and look at it in vim to confirm that it does in fact contain the weather report text.
Ouch, that page is a mess, line-ending-wise :-(. Most of it is dos/windows-style (CRLF), but the paragraphs you're interested in are old-MacOS-style (CR), and of course you're trying to get sensible returns in a system that expects LF which doesn't help :-/

You could add a "tr '\r' '\n'" to the pipeline to translate those into LFs, or "tr -d '\r'" to simply remove them.
 

The Following 5 Users Say Thank You to lma For This Useful Post: