I am trying to input tofile2
from file1
so that each line in file2
is the first field of each file1
line, followed by a space and the current time.
E.g.
IN-X_4096_20140802_121306_007 `random text`
IN-X_4096_20140802_133431_012 `random text`
IN-A_6046_20130613_165426 `random text`
IN-A_6046_20130613_165426 `random text`
IN-X_4096_20140802_133431_014 `random text`
becomes
IN-X_4096_20140802_121306_007 14:24:32
IN-X_4096_20140802_133431_012 14:24:32
IN-A_6046_20130613_165426 14:24:32
IN-A_6046_20130613_165426 14:24:32
IN-X_4096_20140802_133431_014 14:24:32
But what I am getting is
IN-X_4096_20140802_121306_007 0
IN-X_4096_20140802_133431_012 0
IN-A_6046_20130613_165426 0
IN-A_6046_20130613_165426 0
IN-X_4096_20140802_133431_014 0
The code I am using is:
awk '{b=$1" "date +"%r"; print b >"file2.csv" }' file1.csv
The same thing happens when I use "%T"