colcrt command in Linux systems is used to format the text processor output so that it can be viewed on Cathode Ray Tube displays. It removes underlining, strike-throughs and underscores, which can’t be displayed on CRTs since only one character can be produced at a given location on the CRT screen. It also places all the underscores on a new line, right under the original line.
colcrt [-] [-2] [file ...]
Note: For this article, we will be using the below-mentioned files to show the outputs of the colcrt command.
- colcrt command with help option: The help option of colcrt command displays the usage/syntax of the colcrt command.
- colcrt with ‘-‘ option: When colcrt is used with ‘ – ‘ option, the resulting output has all the special formatting (such as strikethrough, underscore, etc.) removed.
colcrt - GFG_1
colcrt - geeksforgeeks.c
- colcrt with ‘-2’ option: When colcrt is used with ‘-2’ option, the resulting output has all the special formatting removed, with the underscores additionally being displayed in new lines. Also, a new empty line is added after every line, which makes the output more easily readable.
colcrt -2 GFG_1
colcrt -2 geeksforgeeks.c