In many UNIX documentation files, there are RLF
control characters. When we output the contents of the documentation file to a plain text file, the control characters become garbled. The col
command effectively filters out these control characters.
col [options]
-b, --no-backspaces
: Filter out all control characters, includingRLF
andHRLF
.-f, --fine
: Allow half-line breaks, usually characters printed at the half-line boundary will be printed on the next line, filters outRLF
characters, but allowsHRLF
characters to be displayed.-p, --pass
: Pass through unknown control sequences, usuallycol
filters out any control sequences from the input other than those it recognizes and interprets itself.-h, --tabs
: Convert spaces to tabs, this is the default setting.-x, --spaces
: Convert tabs to spaces.-l, --lines NUM
: Buffer at leastnum
lines in memory, by default buffers128
lines.-V, --version
: Output version information.-H, --help
: Output help information.
Filter out reverse line feed RLF
from the help documentation of col
and save it to col.txt
.
col --help | col > col.txt
Filter out control characters from the help documentation of col
and save it to col.txt
.
col --help | col -b > col.txt
Convert tabs to spaces in the help documentation of col
and save it to col.txt
.
col --help | col -x > col.txt
https://github.com/WindrunnerMax/EveryDay
https://www.computerhope.com/unix/ucol.htm
https://www.runoob.com/linux/linux-comm-col.html
https://www.geeksforgeeks.org/col-command-in-linux-with-examples/