grep outputs "input file is also the output" when running update-grub

Bug #915008 reported by Dan Kegel on 2012-01-11
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
grep (Ubuntu)
Undecided
Unassigned

Bug Description

On ubuntu 12.04 alpha1, fully updated, running update-grub outputs
grep: input file `/boot/grub/grub.cfg.new' is also the output

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651617 says two contradictory things about this:
1) that the smallest test case for this is
   sh -c 'echo foo >bar; exec >>bar; grep -q foo bar && echo found >&2'
2) that the smallest test case for this is
  grep -qr . > out

I can verify that #1 is correct, and #2 is incorrect, i.e. on the system where grub-update outputs the error message in question, only the first one fails:

dank@a3850:/tmp$ sh -c 'echo foo >bar; exec >>bar; grep -q foo bar && echo found >&2'
grep: input file `bar' is also the output

dank@a3850:/tmp$ grep -qr . > out
^C

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grep (Ubuntu):
status: New → Confirmed
summary: - grep outputs "input file is also the output" when running grub-update
+ grep outputs "input file is also the output" when running update-grub
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers