[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep: return code with -v and empty input
From: |
tt |
Subject: |
Re: grep: return code with -v and empty input |
Date: |
26 Mar 2001 09:22:55 +0300 |
"Alain Magloire" <address@hidden> writes:
> grep.info and man page:
> Diagnostics
> ***********
>
> Normally, exit status is 0 if selected lines are found and 1
> otherwise. But the exit status is 2 if an error occurred, unless the
> `-q' or `--quiet' or `--silent' option is used and a selected line is
> found.
>
>
> Is this not clear?
That's clear enough. What my machine has is this, much less clear:
'
Diagnostics
***********
Normally, exit status is 0 if matches were found, and 1 if no matches
were found (the `-v' option inverts the sense of the exit status).
Exit status is 2 if there were syntax errors in the pattern,
inaccessible input files, or other system errors.
'
In particular the parenthetical remark about `-v' is confusing.
--
Tapani Tarvainen