All Questions
2
questions
1
vote
2
answers
258
views
Aliasing grep in find's -exec option
I have these aliases in my ~/.bashrc
alias grep='grep --color=auto -H'
alias fgrep='fgrep --color=auto -H'
alias egrep='egrep --color=auto -H'
but they have no effect when I run find ... -exec grep .....
1
vote
3
answers
2k
views
A problem with find and grep
I have defined the following alias in ~/.bashrc:
alias fg='find . -name $1 | xargs grep --color $2'
in order to write
fg "*.txt" " my_text "
and find all file that have extension .txt and ...