Convert Unix Timestamp To Human-readable Time
Answer : If the line starts with the unix timestamp, then this should do it: perl -pe 's/^(\d+)/localtime $1/e' inputfilename perl -p invokes a loop over the expression passed with -e which is executed for each line of the input, and prints the buffer at the end of the loop. The expression uses the substition command s/// to match and capture a sequence of digits at the beginning of each line, and replace it with the local time representation of those digits interpreted as a unix timestamp. /e indicates that the replacement pattern is to be evaluated as an expression. If your AWK is Gawk, you can use strftime : gawk '{ print strftime("%c", $1) }' will convert the timestamp in the first column to the current locale’s default date/time representation. You can use this to transform the content before viewing it: gawk '{ print gensub($1, strftime("%c", $1), 1) }' inputfile As Dan mentions in his answer, the Gnu date(1) command can be give