Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
1
Task/System-time/AWK/system-time-1.awk
Normal file
1
Task/System-time/AWK/system-time-1.awk
Normal file
|
|
@ -0,0 +1 @@
|
|||
$ awk 'BEGIN{print systime(),strftime()}'
|
||||
20
Task/System-time/AWK/system-time-2.awk
Normal file
20
Task/System-time/AWK/system-time-2.awk
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
function dos_date( cmd,d,t,x) { # under MS Windows
|
||||
# cmd = "DATE /T"
|
||||
# cmd | getline d # Format depends on locale, e.g. MM/DD/YYYY or YYYY-MM-DD
|
||||
# close(cmd) # close pipe
|
||||
# ##print d
|
||||
# cmd = "TIME /T"
|
||||
# cmd | getline t # 13:59
|
||||
# close(cmd)
|
||||
# ##print t
|
||||
# return d t
|
||||
|
||||
cmd = "echo %DATE% %TIME%" # this gives better time-resolution
|
||||
cmd | getline x # 2014-10-31 20:57:36.84
|
||||
close(cmd)
|
||||
return x
|
||||
}
|
||||
BEGIN {
|
||||
print "Date and time:", dos_date()
|
||||
#print systime(), strftime() # gawk only
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue