Split file based on size

view full story

http://www.unix.com – Hi Friends, Below is my requirement. I have a file with the below structure. 0001A1.... 0001B1.. .... 0001L1 0002A1 0002B1 ...... 0002L1 .. the first 4 characters are the sequence numbers for a record, A record will start with A1 and end with L1 with same sequence number. Now the file that is generated is too big. I need to split the file into multiple files with file size not exceeding 50MB. Assume if total length of file is 332 mb i need 7 splits with each 50 mb and with one condition the records should not be broken. Example: A1..L1 should not split into two files. Please (HowTos)