On Fri, 21 Nov 2008 10:49:16 +0000, pwn <[EMAIL PROTECTED]> wrote: > what software/tool can i use for format my *.txt? there is command on > VIM like "set textwidth" but this is not suitable for me. any help i > appreciate.
Judging from your example text, what you're searching for is a tool to format your text in paragraph mode (block mode) using spaces between the words. I'm not sure if there's already a tool on FreeBSD that does the trick, but you can surely write a simple awk script to do it. I'd suggest something like this: Break each input line into words using the space character as separator. Then, iterate over these words and put spaces after each word; repeat this until you've reached the desired text width. This should be relatively easy to accomplish. Furthermore, you can add an empty string before each output line in order to create a left margin. -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... _______________________________________________ email@example.com mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"