grep -L exit status reverted

Bug #1908892 reported by Geert Uytterhoeven
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grep (Ubuntu)
New
Undecided
Unassigned

Bug Description

After upgrading to Ubuntu 20.04LTS (grep 3.1-2build1 => 3.4-1), the following code snippet stopped working:

# All patches must have "From:", "Date:", and "Subject:" lines
for hdr in From Date Subject; do
    grep -L ^$hdr: $dir/* || ( echo Missing \"$hdr:\" line; exit -1 )
done

It looks like this was fixed upstream, cfr. "Revert -L exit status change introduced in grep 3.2"
(https://git.savannah.gnu.org/cgit/grep.git/commit/?id=0435ebca64fbafcd62008c991dd9377d8a792dfc)

Revision history for this message
Geert Uytterhoeven (geert-linux-m68k) wrote :

This was fixed by the upgrade to 22.04LTS (grep 3.7-1build1).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.