script help

Hi

I am new and trying to find my way around.

Can someone please help me write a script for the foll:

Read a text file
every time the key changes write a new file with
the key as part of the name.

In other words I would like to split a text file based on the key.

Any help will be appreciated.

                     Thanks
                          Khizr

key?

Please review the rules - this appears to be a homework question. You can view the rules here - take note of Rule 6.

Thanks,
ZB

I am definetely not asking a assignment question.

I am trying to archive some files.
The file to be archived is a text file and I have to split it by customer no (key) before archiving.
I believe this can be done using UNIX.
I use a 4GL prog lang. My UNIX skills are limited although I am trying to learn more.

                     Khizr

For the benefit of doubt, I have reopened the thread temporarily.

Thank you for your understanding that all moderators are committed to enforcing the forum rules strictly, and questions that appear to be a homework question will be locked. Maybe if you can try to explain your case in extra detail, and thus demonstrate it is not a homework problem, when you post you can help prevent your question from being locked again in the future.