Clayton Gillespie writes: > Problem: grep does not respond when given a valid command, but produces > errors for option typos
The default behavior of grep is to search for the requested string in its input, rather than in a file. This is useful in using grep as part of a pipeline in which several commands are strung together; then grep can be used to find the parts of the output of one command which match a certain pattern. When no file is specified, grep follows this default behavior. It's not unresponsive -- it's just waiting for you to type in input which it will then search for the pattern you specified. If you say fgrep -e Context testfilename you should see the output you were expecting. An example that shows grep searching its input would be seq 1 20 | grep '[02468]$' to select only the even numbers from the output of the seq command. -- Seth David Schoen <[email protected]> | No haiku patents http://www.loyalty.org/~schoen/ | means I've no incentive to FD9A6AA28193A9F03D4BF4ADC11B36DC9C7DD150 | -- Don Marti
