I am fairly new to awk/nawk and our expert is away on holiday, so I hope someone can help.
I have an input file eg
001,ABC,99900003,500042949,CHRIS
001,CDE,99900011,500042999,DAVID
002,ABC,99900099,500099999,JAMES
003,ZZZ,99900088,500088888,PAUL
I need to create a separate output file dependant on the first 3 characters
eg all 001 lines to be written to file "output.001"
all 002 lines to be written to file "output.002"
etc
Hope you can help
Thanks
jennyj
I have an input file eg
001,ABC,99900003,500042949,CHRIS
001,CDE,99900011,500042999,DAVID
002,ABC,99900099,500099999,JAMES
003,ZZZ,99900088,500088888,PAUL
I need to create a separate output file dependant on the first 3 characters
eg all 001 lines to be written to file "output.001"
all 002 lines to be written to file "output.002"
etc
Hope you can help
Thanks
jennyj