Open In App

colcrt command in Linux with examples

Last Updated : 15 May, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

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


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads