Question : Unix Perl or Shell script to split a data file by header+trailer

Need a Perl  (or even a Shell is fine) to split a data file as follows :

./perl_script datafile
will produce sntci1.dat  sntci2.dat, ..... sntciX.dat
leaving the original datafile intact
where the datafile name is passed as a parameter to the script.

The criteria for splitting the datafile is the header/trailer pair
of  001sntci - 999sntci .

Eg:

001sntci.....
 record1a ...
 ......
 recordXa ...
999sntci....
001sntci ....
 record1b ...
 ...
 recordXb ...
999sntci ...


will produce

sntci1.dat:
========
001sntci.....
 record1a ...
 ......
 recordXa ...
999sntci....


and

sntci2.dat:
========
001sntci ....
 record1b ...
 ...
 recordXb ...
999sntci ...

Answer : Unix Perl or Shell script to split a data file by header+trailer

This is probably a dredded corrupt Outlook profile. Have you tried re-creating your Outlook profile from the mail applet in the control panel?
Random Solutions  
 
programming4us programming4us