Bug 171200

Summary: the bsdgrep(1) man page should document -u
Product: Documentation Reporter: deeptech71 <deeptech71>
Component: Books & ArticlesAssignee: Isabell Long <issyl0>
Status: Closed FIXED    
Severity: Affects Only Me CC: anders, dt71, emaste
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch for grep(1) man page none

Description deeptech71@gmail.com 2012-08-31 11:10:05 UTC
bsdgrep(1) silently ignores the -u flag. This is worth mentioning in the man page.

Fix: 

Add, for example:

    -u
            This option has no effect, and is provided only for compatibility with GNU grep.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-08-31 14:15:30 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-doc

reclassify.
Comment 2 Isabell Long freebsd_committer freebsd_triage 2012-09-15 13:48:30 UTC
State Changed
From-To: open->	 feedback

Hi, 

The bsdgrep(1) man page already says: 

"Historic versions of the grep utility also supported the flags [-ruy]. 
This implementation supports those options; however, their use is 
strongly discouraged." 

which appears to address your concern.  Are you happy for this to be closed? 

Thanks,
Comment 3 Isabell Long freebsd_committer freebsd_triage 2012-09-15 13:48:30 UTC
Responsible Changed
From-To: freebsd-doc->issyl0

I'll deal with this one.
Comment 4 deeptech71@gmail.com 2012-09-25 17:07:59 UTC
Some things:
- Since when is -r (aka. --recursive) obsolete?????
- The man page explicitly mentions the -r and the -y flags (in addition to mentioning them in the history paragraph), and describes what they do. Following this practice, -u should also be explicitly described.
- The whole history paragraph should be removed after adding an explicit descripion for -u. If that is not going to be done, then:
- I recommend replacing "-ruy" with "-r, -u, and -y", to allow man page readers to find the "-u" text.
- I repeat: I find it surprizing that -r is obsolete, since I've been using that option ever since day 1. The bsdgrep man page doesn't mention the obsoleteness of -r directly. The gnugrep man page doesn't even say anything about the obsoleteness of -r.
Comment 5 Anders Jensen-Waud 2014-06-19 05:36:13 UTC
Created attachment 143920 [details]
Patch for grep(1) man page

Patched man page as proposed by the PR submitter. Happy to take your recommendations with respect to other changes.
Comment 6 dt71 2014-12-06 23:11:34 UTC
OK for me.
Comment 7 commit-hook freebsd_committer freebsd_triage 2017-02-19 17:40:57 UTC
A commit references this bug:

Author: emaste
Date: Sun Feb 19 17:40:24 UTC 2017
New revision: 313955
URL: https://svnweb.freebsd.org/changeset/base/313955

Log:
  bsdgrep: document ignored option -u

  MSDOS and Windows GNU grep uses -u to mean "print byte offsets as if
  running on an UNIX system." The option has no effect on systems that
  do not use CRLF line endings.

  PR:		171200
  Submitted by:	deeptech71@gmail.com, Anders Jensen-Waud
  MFC after:	1 month

Changes:
  head/usr.bin/grep/grep.1
Comment 8 commit-hook freebsd_committer freebsd_triage 2017-05-22 15:51:56 UTC
A commit references this bug:

Author: gjb
Date: Mon May 22 15:51:17 UTC 2017
New revision: 318650
URL: https://svnweb.freebsd.org/changeset/base/318650

Log:
  MFC r313955 (emaste):
   bsdgrep: document ignored option -u

   MSDOS and Windows GNU grep uses -u to mean "print byte offsets as if
   running on an UNIX system." The option has no effect on systems that
   do not use CRLF line endings.

  PR:		171200
  Sponsored by:	The FreeBSD Foundation

Changes:
_U  stable/10/
  stable/10/usr.bin/grep/grep.1
_U  stable/11/
  stable/11/usr.bin/grep/grep.1