I have a date as 12/12/2013 14:32 I want to convert it into only 12/12/2013. The string can be 1/1/2013 12:32 or 1/10/2013 23:41
12/12/2013 14:32
12/12/2013
1/1/2013 12:32
1/10/2013 23:41
$ echo "12/12/2013 14:32" | awk '{print $1}' 12/12/2013
print $1 --> Prints first column of the supplied string. 12/12/2013
print $1
print $2 --> Prints second column of the supplied string. 14:32
print $2
14:32
By default, awk treats the space character as the delimiter.