Oct 19, 2005 #1 sabetik IS-IT--Management Joined Nov 16, 2003 Messages 80 Location GU Is there a way to print system date?
Oct 19, 2005 #2 feherke Programmer Joined Aug 5, 2002 Messages 9,541 Location RO Hi What ? Code: awk 'BEGIN { print strftime("%c") }' Feherke. http://rootshell.be/~feherke/ Upvote 0 Downvote
Oct 19, 2005 #3 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR strftime is a GNU extension. One more concentional way: awk 'BEGIN{"date"|getline;print}' Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
strftime is a GNU extension. One more concentional way: awk 'BEGIN{"date"|getline;print}' Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Oct 19, 2005 Thread starter #4 sabetik IS-IT--Management Joined Nov 16, 2003 Messages 80 Location GU How can use in printf function: printf ("date:, strftime(%c), \n") > "test.xls" getting error message. thanks again Upvote 0 Downvote
How can use in printf function: printf ("date:, strftime(%c), \n") > "test.xls" getting error message. thanks again
Oct 19, 2005 #5 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR You wanted this ? awk 'BEGIN{printf("date: %s\n",strftime("%c"))}' Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
You wanted this ? awk 'BEGIN{printf("date: %s\n",strftime("%c"))}' Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Oct 19, 2005 #6 marsd IS-IT--Management Joined Apr 25, 2001 Messages 2,218 Location US Code: gawk ' BEGIN {printf("Date: %s\n",strftime("%c"))}' OR- awk ' BEGIN {"date +%c" | getline out ;printf("Date: %s\n",out);}' And really..shouldn't everyone who can be using gawk by now? Upvote 0 Downvote
Code: gawk ' BEGIN {printf("Date: %s\n",strftime("%c"))}' OR- awk ' BEGIN {"date +%c" | getline out ;printf("Date: %s\n",out);}' And really..shouldn't everyone who can be using gawk by now?