A Bunch of Linux Baloney
Where I keep Linuxisms I want to remember.
Thursday, December 13, 2012
Highlighting grep results
Speaking of highlighting, to highlight grep results add "--color".
To preserve the color when piping through less, two things: To grep add "--color=always" and to less add "-R"
I added aliases to .bashrc
alias less='less -R'
alias grep='grep --color=always'
$ grep if *java|less
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment