I have a value in a file i am processing that has a date like "2012-Jun-13"
how can I convert a date like that 2012-06-13?
Am I stuck building an array of three digit months and corresponding numbers and running through the logic of figuring out the number??
or can I convert this with strftime? if so I cant figure out how... Im also cool with dropping down to the shell level and using gnu date to do this. But I dont know how to pull a system call back into gawk as a variable.
Any ideas?
---------- Post updated at 10:26 AM ---------- Previous update was at 10:17 AM ----------
I found another post details what I need to do this with a system call..
Quote:
Originally Posted by fbg
I could find the answer in other post. Need to do:
echo 40 | awk ' { comm="test.sh "$1; comm | getline y; close(comm); print y } '
Is a nice trick
If anyone knows how to do this without a system call, i would still like to know.
Thanks,
Trey