bash split text into limited character buckets (array member)

Posted by soField on Stack Overflow See other posts from Stack Overflow or by soField
Published on 2010-05-07T08:25:17Z Indexed on 2010/05/07 8:38 UTC
Read the original article Hit count: 224

Filed under:
|
|
|

i have text such as

http://pastebin.com/H8zTbG54

we can say this text is set of rules splitted by "OR" at the end of lines

i need to put set of lines(rules) into buckets (bash array members) but i have character limit for each array member which is 1024

so each array member should contain set of rules but character count for each array member can not exceed 1024

can anybody help me to do that

solaris 10

© Stack Overflow or respective owner

Related posts about bash

Related posts about awk