Bug 132651 - grep -r should warn if no filenames are given
Summary: grep -r should warn if no filenames are given
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: grep   
(Show other bugs)
Version: 2
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Mike McLean
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-09-15 16:02 UTC by Luke Ross
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-27 17:09:23 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to correct this (613 bytes, patch)
2004-09-15 16:03 UTC, Luke Ross
no flags Details | Diff

Description Luke Ross 2004-09-15 16:02:23 UTC
Description of problem:
If grep -r is given no filename parameters, it will wait until entry
is provided on stdin, just as if no -r has been specified. This is
annoying as if the filename is omitted grep hangs, but it is difficult
to tell the difference between grep taking a while and grep waiting
for stdin. I have spent ten minutes waiting for grep to finish a large
directory before realising it had been doing nothing.

As -r makes no sense on stdin (you can't recursively search a
filehandle), how about -r only working if you give a filename?

How reproducible:
Always

Steps to Reproduce:
1. Type command 'grep -r foo' into a console

Actual Results:  Silence

Expected Results:  Receive some indication that -r makes no sense on stdin

Comment 1 Luke Ross 2004-09-15 16:03:30 UTC
Created attachment 103867 [details]
Patch to correct this

Makes grep -r with no filenames stop with an error message.


Note You need to log in before you can comment on or make changes to this bug.