Squirrely wrote:
bash$ rm empty
bash$ touch empty
bash$ # I am expecting a match, so grep should return 0.
bash$ grep '^$' empty
bash$ echo $?

Grep looks for lines that contain matches. An empty file has no lines, so it cannot possibly contain any matches for any regular expression.




Reply via email to