I am trying to use AWK to read a file, comma delimited, and check each field to see if it has a suffix of - (dash , minus sign) if so then I want to either move the minus sign the the beginning of the field or take the numeric portion of the field and multiply it by negative 1 to get the field signed properly with the negative sign preceding the number.
Here is a sample of my data
16361.62 , 4785.75 , 458.00 , 765.00 ,011018, 110.50 , 200.00- , 59, 25 , 443041
.72 , 222032.98 , 46325.27 , 47363.74 , 101643.13 , 776121.82, 11686.72 , 3082.1
2
110896.62 , 24052.37 , 2955.50 , 2032.50 ,10,01,18, 1185.50 , 105.50-, 76461.75
, 14153.18 , 364, 153
68187.16 , 22005.05 , 6767.50 , 1607.00 ,09,01,18, 881.00-, , 46872.51 , 14042.4
4 , 274, 113
110896.62 , 24052.37 , 2955.50 , 2032.50 ,10,01,18, 1185.50 , 105.50-, 76461.75
, 14153.18 , 364, 153