I have a text file which consists of tab delimted fields terminated with a CR/LF. Before the CR/LF an extra tab has been inserted effectively creating a blank field at the end of every line.
I would like to remove this trailing tab from the file. I can't simply replace any occurrence of two consecutive tabs with a single tab as some fields may be intentinally blank, some of the files have 50+ fields with potentially 8 fields in a row being blank.
I have the following Tools at my disposal on a Win2K3 server
Anything in GnuWin32 Batch files
At a push I could install Perl or Python.
I think the correct solution is to use SED but I can't work out how to use it.
field1 <tab> field2 <tab> field3 <tab><tab> <cr><lf>