Re: AWK in 4.X different from 5.X?

2005-03-28 Thread Francisco Reyes
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

Re: AWK in 4.X different from 5.X?

2005-03-28 Thread Jonathan Chen
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 -

Re: AWK in 4.X different from 5.X?

2005-03-28 Thread Francisco Reyes
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. :-)

Re: AWK in 4.X different from 5.X?

2005-03-27 Thread Mario Hoerich
# 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

Re: AWK in 4.X different from 5.X?

2005-03-27 Thread Francisco Reyes
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.

Re: AWK in 4.X different from 5.X?

2005-03-27 Thread Jonathan Chen
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

AWK in 4.X different from 5.X?

2005-03-26 Thread Francisco Reyes
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. ___

Re: AWK in 4.X different from 5.X?

2005-03-26 Thread Christopher Nehren
-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

Re: AWK in 4.X different from 5.X?

2005-03-26 Thread Francisco Reyes
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