sed - How to process only one column and convert unix time in text file in BASH -


i have text file table like

367612510.243586 717.860170 367612512.493918 722.249134 367668441.429983 692.407935 367668479.810461 692.407935 367668482.618858 727.953771 367668515.150386 727.953771 

where first column unix time, , second value. want display list human readable date , time in bash. how it?

it possible additional script file , xargs, i'm looking way in 1 line.

try

awk '{print strftime("%c",$1)}' input.txt 

another approach using while-loop in bash

while read d _; date -d @$d; done < input.txt 

update:

bash solution print second field well

while read f1 f2; echo $(date -d @$f1) $f2; done < input.txt 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -