| Treating multiple lines as one? Within shell |
adni18

msg:3792292 | 1:57 am on Nov 23, 2008 (gmt 0) | Hi there, I have a small problem: I'm trying to download a page and extract a small bit of information from it (by splitting the page and then splitting the result of that split), but when I try to use awk to split the content, it seems to want to treat every line as a different input. How can I make it treat the entire piece as a whole? Here's some sample code: curl -A 'Mozilla/4.0' http://example.com ¦ awk '{split($0,a,"f");print a[2]}'
|
mcavic

msg:3794353 | 3:28 am on Nov 26, 2008 (gmt 0) | Before the awk, try: tr '\n' ' ' That should turn the entire output into one line.
|
|
|