|
nawk 'BEGIN {FS="[ |/]"}
{
printf("%s|%s|%s/%s/%s %s",$1,$2,$4,$5,$3,$6);
for(i=7;i<=NF;i++)
{
printf("|%s",$i);
}
printf "\n";
}' filename
if you want to sort based on the date field, then append the following to end of above command.
| sort -t "|" -k 3.3
|