I need to use awk to group the list in file a.list to a one-liner...
file a.list...
Thu Jan 14 2010, SA v Eng, 4th Test day 1
Fri Jan 15 2010, SA v Eng, 4th Test day 2
Sat Jan 16 2010, SA v Eng, 4th Test day 3
Sun Jan 17 2010, SA v Eng, 4th Test day 4
Mon Jan 18 2010, SA v Eng, 4th Test day 5
output should be...
Jan 14-18 2010, SA v Eng, 4th Test
I can remove the 1st and last 2 fields with...
awk '{$1=$NF=$(NF-1)=""}1'
Please help with grouping the remainder as shown above.
Thanks
file a.list...
Thu Jan 14 2010, SA v Eng, 4th Test day 1
Fri Jan 15 2010, SA v Eng, 4th Test day 2
Sat Jan 16 2010, SA v Eng, 4th Test day 3
Sun Jan 17 2010, SA v Eng, 4th Test day 4
Mon Jan 18 2010, SA v Eng, 4th Test day 5
output should be...
Jan 14-18 2010, SA v Eng, 4th Test
I can remove the 1st and last 2 fields with...
awk '{$1=$NF=$(NF-1)=""}1'
Please help with grouping the remainder as shown above.
Thanks