Joenel de Asis
Joenel de Asis

Reputation: 363

Grep '--colorful' parameter is not working

I would like to know the proper syntax for highlighting with more than one color in grep using --colorful parameter but it says --colorful is unknown option.

Please see my command below:

$ grep --colorful color color.txt
grep: unknown option -- colorful
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.

Thanks Guys.

Upvotes: 0

Views: 370

Answers (1)

gastonmancini
gastonmancini

Reputation: 1102

The option is called --color or --colour. Not --colorful.

From the Unix Man pages : grep()

--colour[=WHEN], --color[=WHEN]
      Surround  the matching string with the marker find in GREP_COLOR
      environment variable. WHEN may be 'never', 'always', or 'auto

Upvotes: 4

Related Questions