Preserve ls colouring after grep’ing
Your grep is probably removing ls‘s color codes because it has its own coloring turned on. You “could” do this: ls -l –color=always | grep –color=never pattern However, it is very important that you understand what exactly you’re grepping here. Not only is grepping ls unnecessary (use a glob instead), this particular case is grepping … Read more