4

awk to print on the same line

view full story
linux-howto

http://www.unix.com – Hi all, I've a script that uses awk to parse the output of wget during a database update. The code I use is: Code: wget -c ftp://ftpsite/file 2>&1 | awk '/0%/ {print}' But this spits out each progress line on a new line: Code: 37250K .......... .......... .......... .......... .......... 80% 10.9M 1s  37300K .......... .......... .......... .......... .......... 80% 11.5M 1s  37350K .......... .......... .......... .......... .......... 80% 10.9M 1s  37400K .......... .......... .......... .......... .......... 80% 11.5M 1s  37450K .......... .......... .... (HowTos)