Hello experts!
I need your help please
I have a file.txt of which I want to extract 3rd and 4th columns with date with the form e.g.:
2016-11-25 03:14:50
and pass them to "date" command, but also append the 9th column in a file as well.
So I want to execute
date -d '2016-11-25 03:14:50' +"%s"
but also get additionally the 9th field in a file.
So far I have tried with
awk '{print "date -d \x27" $3, $4 "\x27 +\x22%s\x22", $9}' file.txt |sh
but I get:
date: extra operand �9nth field content'
I also did experiment with "system" command trying:
awk '{system("date -d \x27" $3, $4 "\x27 +\x22%s\x22")}' file.txt
but I get:
2 is invalid as number of arguments for system
Thank you in advance for your help
M 2.9 FRANCE