On 1/30/2012 12:51 PM, wmiler wrote:
> Feb 01 2009
If you can tell me what format you want it in, I can probably whip up an awk script for it. You should be able to do the whole thing in a single awk call. For example, assuming that wxnow.txt contains the 2nd line in your e-mail, you could use:
awk '{print strftime("%b %d %Y %H:%M"); print}' ~/wxnow.txt
On 31.01.2012 10:21, wmiler wrote:
On Jan 30, 1:20 pm, wmilerwrote:
Um, I can't do that thru wview I imagine, I'm guessing some kind of post-process script? - Wyatt -Ok, so this is what I've got in my post-generate.sh: echo "`date "+%b %d %Y %H:%M"`" | cat - wxnow.txt >/tmp/out && mv /tmp/ out wxnow.txt This gets the date formatted and located correctly: -- Jan 31 2012 13:16 167/4g4t66.2P0.00h22b30.384 -- This now only leaves getting the barometer into the correct units. Any thoughts? Mind you, I stink at sed/awk, I would imagine I'll need to find a way to extract the 30.384, do the calc, and replace it in the file. - Wyatt - CW4149
On Jan 30, 1:04 pm, Michael Graywrote:
date "+%b %d %Y"On 1/30/2012 12:51 PM, wmiler wrote:Feb 01 2009
-- You received this message because you are subscribed to the Google Groups "wview" group. To post to this group, send email to wv...@googlegroups.com. To unsubscribe from this group, send email to wview+un...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/wview?hl=en.
I just found the spec -- I think this will do what you're looking for:
awk '{print strftime("%b %d %Y %H:%M"); split($0,a,"b");printf"%sb%d\n",a[1],a[2]*338.639}' ~/wxnow.txt
--
Dan Rich
http://www.employees.org/~drich/
"Step up to red alert!" "Are you sure, sir?
It means changing the bulb in the sign..."
- Red Dwarf (BBC)
--
You received this message because you are subscribed to the Google Groups "wview" group.
To post to this group, send email to wv...@googlegroups.com.
To unsubscribe from this group, send email to wview+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/wview?hl=en.