- Where Developers Learn, Share, & Build Careers


I would like to grep to dig through my code hierarchy and search the word "x", but the result is color and annoying Skip the words I do now:

  grep -Rn --color x * | The problem is that the matching color loses color because of the pipe. Is it any way to make a statement, so do not lose color?  

specify :

  grep --color = always x * | Grep -v -e html -e svn -e test -e doc -ey   

and afterwards if you need the result in a file pipe and removing the characters that fall in it This format color is required, here is a nifty CAD script, so that you can pipe your result to remove the pipe savers:

  sed -r "s / \ x1b \ [([0- 9] {1, 2} (; [0- 9] {1,2})?) [M | K] // g "  

(Meditation Please give you the option of -E instead of -r for OS X)

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -