grep with color

October 5th, 2006 mysurface Posted in grep, Misc, Text Manipulation | Hits: 16409 | 6 Comments »

Nowadays most of the time, terminal support coloring. For example when you list the files in a directory, the file listed with display with different color, which indicate different type of files.

Grep too, support color, you can do this

grep --color "printf" src

grep will list all lines from files in src directory which have keyword “printf” and the word “printf” will be highlighted with color.

6 Responses to “grep with color”

  1. grep --color "printf" src  #double dash
  2. The problem is, I specified


    , but it been coverts to – (& # 8211 ; )

    Do you have any solution to solve this problem? Change the templates? how to change the entire blockquote to use < code >

  3. I see, mostly it’s the WYSIWYG HTML editor silent conversion, I will test the editor on this weekend.

    Maybe we can add a new “code” button with in that editor, let’s try.

  4. I face another problem when using < pre > < code > pair, '\' inside it will be deleted.

  5. Yes, you are right, therefore you need this &#92; for ( \ )

    Always check out HTML symbol for more at

  6. Thank you for each alternate informative web site. In which otherwise may I buy that type of info coded in this suitable method? I’ve got a vision that i am right now concentrating on, and i have also been for the seek out such information.

Leave a Reply