[Bug 4063] New: grep treats search string as options

bugzilla at busybox.net bugzilla at busybox.net
Fri Aug 12 15:55:05 UTC 2011


https://bugs.busybox.net/show_bug.cgi?id=4063

           Summary: grep treats search string as options
           Product: Busybox
           Version: 1.18.x
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P5
         Component: Other
        AssignedTo: unassigned at busybox.net
        ReportedBy: d77190 at mail.ru
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.0


for example:
system#grep "-t nat" ./0700-firewall
grep: invalid option -- 't'
BusyBox v1.19.0.git (2011-06-02 01:32:43 NOVST) multi-call binary.

Usage: grep [-HhnlLoqvsriwFEz] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE
[FILE]...

Search for PATTERN in FILEs (or stdin)

Options:
        -H      Add 'filename:' prefix
        -h      Do not add 'filename:' prefix
        -n      Add 'line_no:' prefix
        -l      Show only names of files that match
        -L      Show only names of files that don't match
        -c      Show only count of matching lines
        -o      Show only the matching part of line
        -q      Quiet. Return 0 if PATTERN is found, 1 otherwise
        -v      Select non-matching lines
        -s      Suppress open and read errors
        -r      Recurse
        -i      Ignore case
        -w      Match whole words only
        -F      PATTERN is a literal (not regexp)
        -E      PATTERN is an extended regexp
        -z      Input is NUL terminated
        -m N    Match up to N times per file
        -A N    Print N lines of trailing context
        -B N    Print N lines of leading context
        -C N    Same as '-A N -B N'
        -e PTRN Pattern to match
        -f FILE Read pattern from file

any string containing "-" character will give such error.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list