Hi All,
I have a big file of 100,000 lines with the following format:
1,736870,736870,1,2,5,547,1253889535,1253889775,240,30,152.163.141.8,US,0,00,-g 1253889445
1,881246,881246,1,2,6,402,1253889535,1253889775,240,30,152.163.141.8,US,0,00,-g 1253889445
1,975311,975311,1,2,6,72,1253889535,1253889775,240,30,152.163.141.8,US,0,00,-g 1253889445
1,1003112,1003112,1,2,2,93,1253889535,1253889775,240,30,152.163.141.8,US,0,00,-g 1253889445
1,1013824,1013824,1,2,5,547,1253889535,1253889775,240,30,152.163.141.8,US,0,00,-g 1253889445
1,1014543,1014543,1,2,3,72,1253889535,1253889775,240,30,152.163.141.8,US,0,00,-g 1253889445
1,1016002,1016002,1,2,6,878,1253889535,1253889775,240,30,152.163.141.8,US,0,00,-g 1253889445
1,1023369,1023369,1,2,1,1,1253889535,1253889775,240,30,152.163.141.8,US,0,00,-g 1253889445
1,1026987,1026987,1,2,6,72,1253889535,1253889775,240,30,152.163.141.8,US,0,00,-g 1253889445
I would like to get rid of the last field in all the lines. Basically I need a file without the last field "-g 1253889445" in every line.
The output file should look like this:
1,736870,736870,1,2,5,547,1253889535,1253889775,240,30,152.163.141.8,US,0,00,
1,881246,881246,1,2,6,402,1253889535,1253889775,240,30,152.163.141.8,US,0,00,
1,975311,975311,1,2,6,72,1253889535,1253889775,240,30,152.163.141.8,US,0,00,
1,1003112,1003112,1,2,2,93,1253889535,1253889775,240,30,152.163.141.8,US,0,00,
1,1013824,1013824,1,2,5,547,1253889535,1253889775,240,30,152.163.141.8,US,0,00,
1,1014543,1014543,1,2,3,72,1253889535,1253889775,240,30,152.163.141.8,US,0,00,
1,1016002,1016002,1,2,6,878,1253889535,1253889775,240,30,152.163.141.8,US,0,00,
1,1023369,1023369,1,2,1,1,1253889535,1253889775,240,30,152.163.141.8,US,0,00,
1,1026987,1026987,1,2,6,72,1253889535,1253889775,240,30,152.163.141.8,US,0,00,
I am not quite comfortable with sed, awk or perl. Your help is really appreciated.
Thanks,
Toms