Hey Lewis,
From [email protected] Thu Jun 4 23:58:15 2009
I have a bunch of text files (hundreds, maybe thousands);
some are hard wrapped at 72 characters, some are hard wrapped
at 80 characters, a few are hard wrapped at 132 characters,
and some are not wrapped at all (every paragraph is one
line.
I want to o through all of these files and make theam all
hard-wrapped at 72 characters, what's the easiest way to
do this?
If you want to do this using BBEdit, then you can write an AppleScript
to do things for you. Otherwise, you can script this easily from a
normal shell [inside BBEdit if you so desire].
You should make sure that your files all have the right characteristics
and that your auto-wrapping them is not going to destroy some
structured lists or anything like that which should not be auto-wrapped.
If you have that kind of thing, it gets harder, but if you don't,
then you can run everything through fmt(1) if you want, or you could
use a BBEdit script if you like that better.
$ for fname in *; do fmt ${fname} > ${fname%.ext}.wrapped.ext; done
YMMV.
--
Aaron W. Hsu <[email protected]> | <http://www.sacrideo.us>
"Government is the great fiction, through which everybody endeavors to
live at the expense of everybody else." -- Frederic Bastiat
+++++++++++++++ ((lambda (x) (x x)) (lambda (x) (x x))) ++++++++++++++
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "BBEdit Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a specific feature request or would like to report a suspected (or
confirmed) problem with the software, please email to "[email protected]"
rather than posting to the group.
-~----------~----~----~----~------~----~------~--~---