Hi Guys,
I've been given the joyous task of updating some very old scripts at work and I could do with a little help.
Our Unix system dumps text files to pseudo spoolers that our windows machines can then pick up and process. Now the guy who wrote one of the reports is obviously a bit clueless and the certain lines don't match up so for example our % line is a couple of spaces too far across.
A09
62371
__7.20%
so when we import them into excel they give us quite a headache with our old automated routines as figures now end up in the wrong columns.
So instead of re writing the script what I was planning to do was open the file remove 2 spaces from the relevant lines and re save the file then run our normal script. But how is this done?
Eg:
Open repidb
For i=AmtLinesInFile
{
If current line contains a '%' symbol then remove 2 spaces from the start of the line
}
Next i
Something along those lines.
I'm guessing its possible, these files also all have unix line breaks so that makes life slightly more interesting.
If someone can point me in the right direction it would be appreciated.
Cheers
Tom