1

Assume you defined the alias alias grep='grep --color=auto' in ~/.bashrc. Then invoking sudo grep wouldn't trigger the alias to be used. Is there a way to do so? If yes, would that solution be applicable to a piped command as well (e.g cat file | grep 'a')?

I'm using bash 4.3.30 on Ubuntu 14.10.

0 Answers0