You forgot to tell grep
where to search, so it just sits there waiting for data to be input from 'stdin' – often a pipe, but in this case your keyboard. You can confirm by entering something like "this is a word
", Enter, CtrlZ, Enter.
If you want to search the current directory, recursively, give .
as the path.
grep -rne word .
(Note 2012-07: The latest version of GNU grep will search the current directory automatically if -r
is given.)
In many cases, *
will work too, but it is not recommended because 1) it is inefficient – expanding the wildcard to all file names takes some time and might even overflow the permitted command line length; 2) it does not match dotfiles (names starting with a dot) in most shells, although I'm not sure if this applies to expansion done by Cygwin itself.
Try grep -rne word * This * should not be necessary, but it work for me – None – 2011-12-05T16:55:12.207