Need help on a script to perform the following actions:
I have a text file (records.txt) generated from one server (Server_A), this file is delimited by semicolon (

. It contains details which should be ftp to other 3 servers to be used as an input file to a script which will then process the files. Field 5 of records.txt contains the name of the server to be sent the file. So there has to be three new text files generated from records.txt depending on server name. The first task is to replace the semicolon in records.txt with space. Example of records.txt is below:
records.txt
03/03/07;40065;MER11;40000;STR_SERV2;1;0.00;23.83;10:00: 00;0.00;23.45;FAULTY_UNIT
03/03/07;40065;MER11;40000;STR_SERV1;1;0.00;23.83;10:00: 00;0.00;23.45;RESTORED
03/03/07;40065;MER11;40000;STR_SERV3;1;0.00;23.83;10:00: 00;0.00;23.45;FAULTY_UNIT
03/03/07;40065;MER11;40000;STR_SERV1;1;0.00;23.83;10:00: 00;0.00;23.45;FAULTY_UNIT
03/03/07;40065;MER11;40000;STR_SERV1;1;0.00;23.83;10:00: 00;0.00;23.45;RESTORED
03/03/07;40065;MER11;40000;STR_SERV2;1;0.00;23.83;10:00: 00;0.00;23.45;FAULTY_UNIT
03/03/07;40065;MER11;40000;STR_SERV1;1;0.00;23.83;10:00: 00;0.00;23.45;FAULTY_UNIT
03/03/07;40065;MER11;40000;STR_SERV1;1;0.00;23.83;10:00: 00;0.00;23.45;RESTORED
03/03/07;40065;MER11;40000;STR_SERV2;1;0.00;23.83;10:00: 00;0.00;23.45;FAULTY_UNIT
03/03/07;40065;MER11;40000;STR_SERV1;1;0.00;23.83;10:00: 00;0.00;23.45;FAULTY_UNIT
03/03/07;40065;MER11;40000;STR_SERV3;1;0.00;23.83;10:00: 00;0.00;23.45;RESTORED
The above file should generate 3 files (STR_SERV1.txt, STR_SERV2.txt & STR_SERV3.txt) to be ftp to the 3 servers
STR_SERV1.txt (FTP to STR_SERV1)
03/03/07 40065 MER11 40000 STR_SERV1 1 0.00 23.83 10:00:00 0.00 23.45 RESTORED
03/03/07 40065 MER11 40000 STR_SERV1 1 0.00 23.83 10:00:00 0.00 23.45 FAULTY_UNIT
03/03/07 40065 MER11 40000 STR_SERV1 1 0.00 23.83 10:00:00 0.00 23.45 RESTORED
03/03/07 40065 MER11 40000 STR_SERV1 1 0.00 23.83 10:00:00 0.00 23.45 FAULTY_UNIT
03/03/07 40065 MER11 40000 STR_SERV1 1 0.00 23.83 10:00:00 0.00 23.45 RESTORED
03/03/07 40065 MER11 40000 STR_SERV1 1 0.00 23.83 10:00:00 0.00 23.45 FAULTY_UNIT
STR_SERV2.txt (FTP to STR_SERV2)
03/03/07 40065 MER11 40000 STR_SERV2 1 0.00 23.83 10:00:00 0.00 23.45 FAULTY_UNIT
03/03/07 40065 MER11 40000 STR_SERV2 1 0.00 23.83 10:00:00 0.00 23.45 FAULTY_UNIT
03/03/07 40065 MER11 40000 STR_SERV2 1 0.00 23.83 10:00:00 0.00 23.45 FAULTY_UNIT
STR_SERV3.txt (FTP to STR_SERV3)
03/03/07 40065 MER11 40000 STR_SERV3 1 0.00 23.83 10:00:00 0.00 23.45 FAULTY_UNIT
03/03/07 40065 MER11 40000 STR_SERV3 1 0.00 23.83 10:00:00 0.00 23.45 RESTORED
Thanks for a shell script to perform the function above