Skip to content
Advertisement

Date manipulation in awk variable : Non Military Format

In the mentioned code : | awk '{ print $1, $2 }' AWK $2 is having “Thu Nov 19 17:00:00 2015” in it. I want to manipulate this date String there only in inline awk in Non Military format “Thu Nov 19 05:00:00 PM 2015“. Please help.

Advertisement

Answer

This line should give you the expected format:

JavaScript

Here you go:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement