Paragraph text can easily be reformatted in Linux with the use of the Fmt command. The standard default for output is 75 characters per line, and Fmt is used to reformat lines in the configuration you desire. This is a very common Linux command and one users should become familiar with.
Use Fmt Basics
Step1 Use Fmt to reformat paragraph text in mail messages. If you do this before you send your mail messages, you can avoid frustration and the most common errors.
Step2 Input and output are standard when using fmt to reformat text. To change this, you will need to change File arguments to suit your specifications.
Step3 Indentation, blanks and spacing of the input text (probably set by default) will be maintained. Know also that only lines of identical indentation will be joined in the output.
Step4 Fmt is used to reformat text, it will attempt to coordinate a line break with the end of a sentence. It will also avoid breaking a line before the last word of a sentence or right after the first word to maintain continuity and smooth flow.
Step5 Notice what kind of code is being used. The specific type of code will determine what commands and functions can be used. You will probably need a different tool to reformat Perl code, for example.
Learn Fmt Options to Reformat Paragraph Text
Step1 Use the -WIDTH command to reformat output line width. Remember that the default setting is 75 characters.
Step2 Use the -s option to split lines. This will prevent several short lines from being reformatted into longer ones. This will maintain the integrity of the text so that reformatting does not change the code.
Step3 Use the -u option for uniform spacing. One space is used between each word and two between each sentence.
Step4 Use -c and -t commands for indentations. The -c command sets paragraph indentation for the third and subsequent lines the same as for the second. The -t command will set the first line of the paragraph apart as its own paragraph if its indentation is the same as the second line.
Step5 Use -p PREFIX option to modify program comments without changing its code.
Step6 Visit FreeBSD to learn more about how to use fmt for simple text reformatting jobs (see Resources below).
How to Use Fmt to Reformat Text
tags: Linux | author: chaoPosts Relacionados:
Subscribe to:
Post Comments (Atom)
0 comment:
Post a Comment