[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to do this, fold + split



On Fri, Dec 30, 2011 at 12:03 PM, Kleber Fortaleza
<kleberfortaleza@gmx.com> wrote:
> On Friday 30 December 2011 13:09:13 T o n g wrote:
>> Hi,
>>
>> I want to split a file every ### of chars. Is it possible not to split on
>> the word but word boundaries?
>>
>> Thanks
> this shoud be what you want
>
> split -b <num_of_chars> <input_filename>

I can't say I know the answer to the question, but I think he's
asking, "How can I split a file on the nearest whitespace every X
number of characters?"  I don't think split -b does this (and I'm not
aware of any simple tool that can).  I think this will require
development of a script to accomplish.  Maybe some regex magic with
split -p can do it.

-- 
Chris


Reply to: