Search Results

Search: Posts Made By: bkkid
19,258
Posted By binlib
gawk 'BEGIN { for (i = 1; i < 13; ++i) ...
gawk 'BEGIN {
for (i = 1; i < 13; ++i)
m[strftime("%b", mktime("2012 " i " 1 0 0 0"))] = i
FS = "[ :,]+"
}
/all:/ {
print mktime($8 " " m[$2] " " $3 " " $4 " " $5 " " $6)
}'
1,618
Posted By Corona688
awk understands tokens, which lets you do things...
awk understands tokens, which lets you do things on 'the third column' instead of a big regex with width specifiers, so I'd use it here to make things simpler.

awk '{ sub(/,/, "|~|", $6); # Change...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 12:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy