Here is my data
I have a file in the format below with about 15 fields per each record. I have 2 records displayed below.
"1234","Andy ","Rich ","0001","123 Main Street ","Dallas ", "1"
"2345","Andrew ","Richter ","0002","234 First Ave ","Kirby ", " "
My Final output needs to be as follows
"1234","Andy","Rich","0001","123 Main Street","Dallas","1"
"2345","Andrew","Richter","0002","234 First Ave","Kirby"," "
I am using the following Sed command and it works excep it also deletes the space in the field and I need the last data element to stay like it is either a "1" or a " " (space).
sed -e 's/[ ]"/"/g' inputfile>outputfile...
what do I need to change in the sed command that I am using to get the result that I am looking for. The above is just the sample of the data, and it is not all data elements, there are quite a few additional fields but the last field is what I have in my data sample.
Thanks