colcrt command in Linux with examples

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.

Syntax:

colcrt [-] [-2] [file ...]

Note: For this article, we will be using the below-mentioned files to show the outputs of the colcrt command.

  • GFG_1:

  • geeksforgeeks.c

Options:

  • colcrt command with help option: The help option of colcrt command displays the usage/syntax of the colcrt command.
    colcrt -h

  • colcrt with ‘-‘ option: When colcrt is used with ‘ – ‘ option, the resulting output has all the special formatting (such as strikethrough, underscore, etc.) removed.

    Example 1:

    colcrt - GFG_1

    Example 2:

    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.

    Example 1:

    colcrt -2 GFG_1

    Example 2:

    colcrt -2 geeksforgeeks.c



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.