Skip to main content

I have dafineddefined the following alias in .bashrc~/.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 contain " my_text " but it does not work. Why?

I have dafined the following 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 contain " my_text " but it does not work. Why?

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 contain " my_text " but it does not work. Why?

Tweeted twitter.com/#!/StackUnix/status/48708058477637633
Source Link
Narek
  • 127
  • 6

A problem with find and grep

I have dafined the following 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 contain " my_text " but it does not work. Why?