[Techtalk] Program to wrap lines

Marleen Garcia d.lineate at skynet.be
Wed Oct 1 23:47:04 EST 2003


On Mon, Sep 29, 2003 at 09:15:16PM +1000, John Clarke <johnc+linuxchix at kirriwa.net> wrote:
> 
> So, "fold" is the magic word you're looking for.  It even defaults to
> the 80 characters that you used as an example :-)

I'm sure fold has its uses ... just don't try rewrapping lines that
have hard line breaks (most files on a Unix, Linux, system, even the
ones that you save to a dos ff w/VIM!!!).

If you've got a file written in say Notepad, or Wordpad, text that
doesn't have hard line breaks (hey, that's Windows for you), then
it's OK to use. You won't be "re-wrapping" anything. Lines aren't
really broken anyway (LF/CR for EOL - grossly problematic just not
this time).

Try this a few times with different files from different systems,
you'll see. Write a file in Notepad, Wordpad (Windows), and have
wrapping turned on in the editor, then use fold on the result. Oh,
no. No problem there.

Mac files, Linux files, Unix files though all have hard line breaks,
Mac (EOL=CR) - Linux/Unix (EOL=LF), so fold is not an option.

PS, to stop it from breaking words wherever use -s if you are going
to use it.

Anyway ... There must be a better way to do this!

Marleen

-- 
Home set-up: SuSE 8.0 & Smoothwall   ~    http://www.bluneon.org
ICQ: 29190449 - MSN: d.lineate at skynet.be - Jabber.org: d.LiNeAtE


More information about the Techtalk mailing list