I have a CSV file that contains 10 different fields (
, is the deliminator). Example data:
student-id,last,first,hwk1,hwk2,hwk3,exam1,hwk4,hwk5,exam2 pts-avail,,,100,150,100,200,150,100,300 991-78-7872,Thompson,Ken,95,143,79,185,135,95,259
I need to swap
sed but having a difficult time understanding how to write the regular expression.
I have tried along with other variations:
sed 's/\(.*[,]\)\(.*[,]\)\(.*[,]\)/\1\3\2/g' test
In my test file:
It works fine… I have been looking at this for a while and can't figure it out. Anyone able to provide some direction?