http://qs1969.pair.com?node_id=1224896


in reply to Re: search for a pattern in file without opening the file
in thread search for a pattern in file without opening the file

If the grep finds a match it returns 0 or 1?

Replies are listed 'Best First'.
Re^3: search for a pattern in file without opening the file
by hippo (Bishop) on Oct 30, 2018 at 09:04 UTC

    Yes, as explained in the Exit Status section of the man page.