Howdy everyone, I have need of a scripting brain to help me through the following issue:
*This will help if I explain what I am doing this for and then it may make sense.
I need to change a flat file to prepend a 3 digit code to a certain field in the file going on the value in another scetion of the same line.
Confused? I thought so!
Anyhow here goes.
In the attached flat file there is a field 4 digits at position 155 which is an Australian post-code (zip code). I need my script to read this value and if it begins with a certain number (eg: 9XXX for Western Australia) take a pre-defined TZ 3 digit code (eg: starts with a 9 > code will equal 900) and take this TZ 3 digit code and insert it at the point 216, then at 237 and finally at 258 on the same line. These are three phone numbers (home, work, mobile)
I have tried a few awk attempts but not geting the syntax correct and feel I need something bigger and stronger than this?
Please have a read of the attached text file and you'll see it is just a list of name addresses and phone numbers. NB: I have changed some of the umbers to be X and Y for confidentiality.
This is for a dialler application and sadly it uses are codes for working out what time zone the record is in. In Australia area codes span different time zones, but post codes do not. So the use of postal codes is the most logical choice but in order to get the dialler application to dial using it's time zones functionality I must give it area codes to work with.
Does this make sense?
Please email or contact me at any time if you need clarification on anything.
PS: I am in Australia