[MITgcm-support] STDOUT monitor output
Ed Hill
ed at eh3.com
Mon Jan 16 12:34:22 EST 2006
On Mon, 2006-01-16 at 12:27 -0500, Ed Hill wrote:
> On Mon, 2006-01-16 at 12:05 -0500, Ed Hill wrote:
> >
> > 1) write a smarter parser for the ASCII output or
>
> Oh, and heres one very quick-and-dirty way to add the "E" when its
> missing:
>
> echo 1.234567890+123 | sed -e 's/[0-9]+/&E/' \
> | sed -e 's/+E/E+/' | sed -e 's/-E/E-/'
Rats! I noticed the syntax was wrong just as I hit "send". Heres a
better version:
echo "123456789E+7 1.234567890-123 1.234567890+123" \
| sed -e 's/[0-9][+-]/&E/g' | sed -e 's/+E/E+/g' | sed -e 's/-E/E-/g'
Ed
--
Edward H. Hill III, PhD
office: MIT Dept. of EAPS; Rm 54-1424; 77 Massachusetts Ave.
Cambridge, MA 02139-4307
emails: eh3 at mit.edu ed at eh3.com
URLs: http://web.mit.edu/eh3/ http://eh3.com/
phone: 617-253-0098
fax: 617-253-4464
More information about the MITgcm-support
mailing list