On Mon, 28 Mar 2005, Jonathan Chen wrote:
On Sun, Mar 27, 2005 at 12:09:03PM -0500, Francisco Reyes wrote:
Since this was from a shell script I did
date | awk '{print #$1 $2 - $3 - $6}'
How about:
date +#%a %b - %d - %Y
Where/how do I put that?
I tried to put it inside the awk side, but
On Mon, Mar 28, 2005 at 10:21:24AM -0500, Francisco Reyes wrote:
On Mon, 28 Mar 2005, Jonathan Chen wrote:
On Sun, Mar 27, 2005 at 12:09:03PM -0500, Francisco Reyes wrote:
Since this was from a shell script I did
date | awk '{print #$1 $2 - $3 - $6}'
How about:
date +#%a %b - %d -
On Tue, 29 Mar 2005, Jonathan Chen wrote:
which is equivalent to :
date +#%a %b - %d - %Y
Doing this within awk is another story.. Sorry.
Got it. Originally I thought it was something to do from AWK.
I tried the string you wrote from the command line and worked.
I like your approach better. :-)
# Francisco Reyes:
[ strftime() not in 5.x-awk ]
Now I just wonder how to get date in my output. :-(
Well, if nothing else helps there's always system(date).
However, you could also install lang/gawk.
HTH,
Mario
___
freebsd-questions@freebsd.org
On Sun, 27 Mar 2005, Mario Hoerich wrote:
Now I just wonder how to get date in my output. :-(
Well, if nothing else helps there's always system(date).
However, you could also install lang/gawk.
Since this was from a shell script I did
date | awk '{print #$1 $2 - $3 - $6}'
It works for my needs.
On Sun, Mar 27, 2005 at 12:09:03PM -0500, Francisco Reyes wrote:
On Sun, 27 Mar 2005, Mario Hoerich wrote:
Now I just wonder how to get date in my output. :-(
Well, if nothing else helps there's always system(date).
However, you could also install lang/gawk.
Since this was from a shell
Are the AWK in the 4.X branch and 5.X branch different?
Looking at
http://www.shelldorado.com/articles/awkcompat.html#os11
it seems the AWK in the 4.X branch has strftime.
I have 5.3 in my machine and AWK doesn't have that function.
___
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 2005-03-26, Francisco Reyes scribbled these
curious markings:
Are the AWK in the 4.X branch and 5.X branch different?
Looking at
http://www.shelldorado.com/articles/awkcompat.html#os11
it seems the AWK in the 4.X branch has strftime.
I have
On Sat, 26 Mar 2005, Christopher Nehren wrote:
Probably because the awk on a 4.x machine is GNU awk, whereas the 5.x
awk is the awk that comes straight from the horse's mouth, so to speak,
and so thus hasn't been extended with GNUisms.
Thanks.
That makes sense.
Now I just wonder how to get date in