[ubuntu-us-mn] Scaling a number string in Sed?

Fred H Olson fholson at cohousing.org
Thu Feb 7 18:59:38 UTC 2013


Anyone know whether Sed can be used to convert the last line of Wget
output (first line of exmple below) to something like the second line.
That is to scale the KB/s to Mb/s (multiply by .008) ?
Or another way to do it?
Anyone care to take a stab at it?

I've Sed a bit tho I'd have to study it again.  But I dont know how to
multiply a number ( a string) and display the result.

Example -----------
2013-02-07 12:39:50 (607 KB/s) - `listing61011.pdf' saved [4533600/4533600]
2013-02-07 12:39:50 (4.9Mb/s 607 KB/s) - `listing61011.pdf' saved

Fred

--
Fred H. Olson  Minneapolis,MN 55411  USA        (near north Mpls)
     Email:        fholson at cohousing.org      612-588-9532
My Link Pg: http://fholson.cohousing.org         My org:
Communications for Justice -- Free, superior listserv's w/o ads




More information about the ubuntu-us-mn mailing list