bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: twisted.
Subject:
Date: Sat, 4 Jan 2003 09:55:37 +0100

Regexp selection and interpretation:
  -E, --extended-regexp     PATTERN is an extended regular _expression_
  -F, --fixed-strings       PATTERN is a set of newline-separated strings
  -G, --basic-regexp        PATTERN is a basic regular _expression_
  -e, --regexp=PATTERN      use PATTERN as a regular _expression_
  -f, --file=FILE           obtain PATTERN from FILE
  -i, --ignore-case         ignore case distinctions
  -w, --word-regexp         force PATTERN to match only whole words
  -x, --line-regexp         force PATTERN to match only whole lines
  -z, --null-data           a data line ends in 0 byte, not newline
 
Miscellaneous:
  -s, --no-messages         suppress error messages
  -v, --invert-match        select non-matching lines
  -V, --version             print version information and exit
      --help                display this help and exit
      --mmap                use memory-mapped input if possible
 
Output control:
  -b, --byte-offset         print the byte offset with output lines
  -n, --line-number         print line number with output lines
  -H, --with-filename       print the filename for each match
  -h, --no-filename         suppress the prefixing filename on output
  -q, --quiet, --silent     suppress all normal output
      --binary-files=TYPE   assume that binary files are TYPE
                            TYPE is 'binary', 'text', or 'without-match'.
  -a, --text                equivalent to --binary-files=text
  -I                        equivalent to --binary-files=without-match
  -d, --directories=ACTION  how to handle directories
                            ACTION is 'read', 'recurse', or 'skip'.
  -r, --recursive           equivalent to --directories=recurse.
  -L, --files-without-match only print FILE names containing no match
  -l, --files-with-matches  only print FILE names containing matches
  -c, --count               only print a count of matching lines per FILE
  -Z, --null                print 0 byte after FILE name
 
Context control:
  -B, --before-context=NUM  print NUM lines of leading context
  -A, --after-context=NUM   print NUM lines of trailing context
  -C, --context[=NUM]       print NUM (default 2) lines of output context
                            unless overridden by -A or -B
  -NUM                      same as --context=NUM
  -U, --binary              do not strip CR characters at EOL (MSDOS)
  -u, --unix-byte-offsets   report offsets as if CRs were not there (MSDOS)
 
`egrep' means `grep -E'.  `fgrep' means `grep -F'.
With no FILE, or when FILE is -, read standard input.  If less than
two FILEs given, assume -h.  Exit status is 0 if match, 1 if no match,
and 2 if trouble.
 
Report bugs to <address@hidden>.
bash-2.05a$ grep -c -E 'Mateusz Radoslaw' /etc/passwd
0
bash-2.05a$ grep -c -E "Mateusz Radoslaw" /etc/passwd
0
bash-2.05a$ grep -E "Mateusz Radoslaw" /etc/passwd
bash-2.05a$ grep -Ec "Mateusz Radoslaw" /etc/passwd
0
bash-2.05a$ grep -Fc "Mateusz Radoslaw" /etc/passwd
0
bash-2.05a$ grep -F -c "Mateusz Radoslaw" /etc/passwd
0
bash-2.05a$ grep --help | more
Usage: grep [OPTION]... PATTERN [FILE] ...
Search for PATTERN in each FILE or standard input.
Example: grep -i 'hello world' menu.h main.c
 
Regexp selection and interpretation:
  -E, --extended-regexp     PATTERN is an extended regular _expression_
  -F, --fixed-strings       PATTERN is a set of newline-separated strings
  -G, --basic-regexp        PATTERN is a basic regular _expression_
  -e, --regexp=PATTERN      use PATTERN as a regular _expression_
  -f, --file=FILE           obtain PATTERN from FILE
  -i, --ignore-case         ignore case distinctions
  -w, --word-regexp         force PATTERN to match only whole words
  -x, --line-regexp         force PATTERN to match only whole lines
  -z, --null-data           a data line ends in 0 byte, not newline
 
Miscellaneous:
  -s, --no-messages         suppress error messages
  -v, --invert-match        select non-matching lines
  -V, --version             print version information and exit
      --help                display this help and exit
      --mmap                use memory-mapped input if possible
 
Output control:
  -b, --byte-offset         print the byte offset with output lines
  -n, --line-number         print line number with output lines
  -H, --with-filename       print the filename for each match
  -h, --no-filename         suppress the prefixing filename on output
  -q, --quiet, --silent     suppress all normal output
      --binary-files=TYPE   assume that binary files are TYPE
                            TYPE is 'binary', 'text', or 'without-match'.
  -a, --text                equivalent to --binary-files=text
  -I                        equivalent to --binary-files=without-match
  -d, --directories=ACTION  how to handle directories
                            ACTION is 'read', 'recurse', or 'skip'.
  -r, --recursive           equivalent to --directories=recurse.
  -L, --files-without-match only print FILE names containing no match
  -l, --files-with-matches  only print FILE names containing matches
  -c, --count               only print a count of matching lines per FILE
  -Z, --null                print 0 byte after FILE name
 
Context control:
  -B, --before-context=NUM  print NUM lines of leading context
  -A, --after-context=NUM   print NUM lines of trailing context
  -C, --context[=NUM]       print NUM (default 2) lines of output context
                            unless overridden by -A or -B
  -NUM                      same as --context=NUM
  -U, --binary              do not strip CR characters at EOL (MSDOS)
  -u, --unix-byte-offsets   report offsets as if CRs were not there (MSDOS)
 
`egrep' means `grep -E'.  `fgrep' means `grep -F'.
With no FILE, or when FILE is -, read standard input.  If less than
two FILEs given, assume -h.  Exit status is 0 if match, 1 if no match,
and 2 if trouble.
 
Report bugs to <address@hidden>.
bash-2.05a$ PS1='DUPA'
DUPAPS1='DUPA>'
DUPA>egrep -c Jacek Marek /etc/passwd
egrep: Marek: No such file or directory
/etc/passwd:20
DUPA>egrep -c Jacek /etc/passwd
20
DUPA>egrep -c Jacek +Marek /etc/passwd
egrep: +Marek: No such file or directory
/etc/passwd:20
DUPA>egrep -c "Jacek Marek" /etc/passwd
0
DUPA>fgrep -c "Jacek Marek" /etc/passwd
0
DUPA>fgrep -c Jacek Marek /etc/passwd
fgrep: Marek: No such file or directory
/etc/passwd:20
DUPA>w
 9:30AM  up 19 days, 42 mins, 4 users, load averages: 0.62, 0.46, 0.35
USER    TTY FROM              LOGIN@  IDLE WHAT
lbienkie p1 a7.iie.uz.zgora.  8:33AM    24 -bash
ganiol   p4 a8.iie.uz.zgora.  8:43AM    14 -bash
kfrackie p7 a9.iie.uz.zgora.  8:48AM    10 -bash
lrajchel p8 client-galtex-7.  8:23AM     0 w
DUPA>fgrep -c Jacek /etc/passwd
20
DUPA>fgrep -c (Jacek Marek) /etc/passwd
bash: syntax error near unexpected token `(J'
DUPA>fgrep -c `(Jacek Marek)` /etc/passwd
bash: Jacek: command not found
^[[A^[[D^[[A
^C
DUPA>fgrep -c '(Jacek Marek)' /etc/passwd
0
DUPA>fgrep -cf Jacek Marek /etc/passwd
fgrep: Jacek: No such file or directory
DUPA>fgrep -cf Jacek /etc/passwd
fgrep: Jacek: No such file or directory
DUPA>fgrep -c -f Jacek /etc/passwd
fgrep: Jacek: No such file or directory
DUPA>
DUPA>fgrep -c Jacek /etc/passwd
20
DUPA>grep -c Tomasz /etc/passwd
74
DUPA>grep Rajchel /etc/passwd
lrajchel:*:1882:3001:Rajchel Lukasz:/home/zaoczni/2001/lrajchel:/bin/bash
DUPA>grep Rajchel /etc/passwd -exec mail -s "konto" lrajchel
/etc/passwd:uucp:*:66:1:UNIX-to-UNIX Copy:/var/spool/uucppublic:/usr/libexec/uucp/uucico
DUPA>mail
No mail for lrajchel
DUPA>grep Rajchel /etc/passwd -exec mail -s "konto" lrajchel {} \;
/etc/passwd:uucp:*:66:1:UNIX-to-UNIX Copy:/var/spool/uucppublic:/usr/libexec/uucp/uucico
DUPA>mail
No mail for lrajchel
DUPA>fgrep -c Jacek /etc/passwd
20
DUPA>fgrep -c Jacek Marek /etc/passwd -print
fgrep: invalid option -- p
Usage: fgrep [OPTION]... PATTERN [FILE]...
Try `fgrep --help' for more information.
DUPA>fgrep -c Jacek Marek /etc/passwd
fgrep: Marek: No such file or directory
/etc/passwd:20
DUPA>grap -c Mateusz /etc/passwd | grep Radoslaw /etc/passwd
bash: grap: command not found
radek:*:163:201:Radoslaw Puscian:/home/staff/iie/radek:/bin/bash
radziu:*:428:246:Radoslaw Gorowy:/home/dzienni/gr46ei/radziu:/bin/bash
rpuscian:*:446:201:Radoslaw Puscian:/home/staff/iie/rpuscian:/bin/bash
rgasiore:*:455:246:Radoslaw Gasiorek:/home/dzienni/gr46ei/rgasiore:/bin/bash
rugrynow:*:1254:272:Radoslaw Ugrynowicz:/home/zaoczni/gr203e/rugrynow:/bin/bash
rgas:*:1400:216:Radoslaw Gas:/home/dzienni/gr16ei/rgas:/bin/bash
rpleszyn:*:1125:306:Radoslaw Pleszyniak:/home/zaoczni/podyplom/rpleszyn:/bin/bash
rgolec:*:1530:246:Radoslaw Golec:/home/dzienni/gr46ei/rgolec:/bin/bash
rjakubow:*:1761:2000:Radoslaw Jakubowski:/home/dzienni/2000/rjakubow:/bin/bash
rkotzbac:*:1800:3001:Radoslaw Kotzbach:/home/zaoczni/2001/rkotzbac:/bin/bash
rkurzaws:*:1868:3001:Kurzawski Radoslaw:/home/zaoczni/2001/rkurzaws:/bin/bash
DUPA>grep -c Mateusz /etc/passwd | grep Radoslaw /etc/passwd
radek:*:163:201:Radoslaw Puscian:/home/staff/iie/radek:/bin/bash
radziu:*:428:246:Radoslaw Gorowy:/home/dzienni/gr46ei/radziu:/bin/bash
rpuscian:*:446:201:Radoslaw Puscian:/home/staff/iie/rpuscian:/bin/bash
rgasiore:*:455:246:Radoslaw Gasiorek:/home/dzienni/gr46ei/rgasiore:/bin/bash
rugrynow:*:1254:272:Radoslaw Ugrynowicz:/home/zaoczni/gr203e/rugrynow:/bin/bash
rgas:*:1400:216:Radoslaw Gas:/home/dzienni/gr16ei/rgas:/bin/bash
rpleszyn:*:1125:306:Radoslaw Pleszyniak:/home/zaoczni/podyplom/rpleszyn:/bin/bash
rgolec:*:1530:246:Radoslaw Golec:/home/dzienni/gr46ei/rgolec:/bin/bash
rjakubow:*:1761:2000:Radoslaw Jakubowski:/home/dzienni/2000/rjakubow:/bin/bash
rkotzbac:*:1800:3001:Radoslaw Kotzbach:/home/zaoczni/2001/rkotzbac:/bin/bash
rkurzaws:*:1868:3001:Kurzawski Radoslaw:/home/zaoczni/2001/rkurzaws:/bin/bash
DUPA>grep Mateusz /etc/passwd | grep Radoslaw /etc/passwd
radek:*:163:201:Radoslaw Puscian:/home/staff/iie/radek:/bin/bash
radziu:*:428:246:Radoslaw Gorowy:/home/dzienni/gr46ei/radziu:/bin/bash
rpuscian:*:446:201:Radoslaw Puscian:/home/staff/iie/rpuscian:/bin/bash
rgasiore:*:455:246:Radoslaw Gasiorek:/home/dzienni/gr46ei/rgasiore:/bin/bash
rugrynow:*:1254:272:Radoslaw Ugrynowicz:/home/zaoczni/gr203e/rugrynow:/bin/bash
rgas:*:1400:216:Radoslaw Gas:/home/dzienni/gr16ei/rgas:/bin/bash
rpleszyn:*:1125:306:Radoslaw Pleszyniak:/home/zaoczni/podyplom/rpleszyn:/bin/bash
rgolec:*:1530:246:Radoslaw Golec:/home/dzienni/gr46ei/rgolec:/bin/bash
rjakubow:*:1761:2000:Radoslaw Jakubowski:/home/dzienni/2000/rjakubow:/bin/bash
rkotzbac:*:1800:3001:Radoslaw Kotzbach:/home/zaoczni/2001/rkotzbac:/bin/bash
rkurzaws:*:1868:3001:Kurzawski Radoslaw:/home/zaoczni/2001/rkurzaws:/bin/bash
DUPA>grep 'Mateusz' /etc/passwd | grep 'Radoslaw' /etc/passwd
radek:*:163:201:Radoslaw Puscian:/home/staff/iie/radek:/bin/bash
radziu:*:428:246:Radoslaw Gorowy:/home/dzienni/gr46ei/radziu:/bin/bash
rpuscian:*:446:201:Radoslaw Puscian:/home/staff/iie/rpuscian:/bin/bash
rgasiore:*:455:246:Radoslaw Gasiorek:/home/dzienni/gr46ei/rgasiore:/bin/bash
rugrynow:*:1254:272:Radoslaw Ugrynowicz:/home/zaoczni/gr203e/rugrynow:/bin/bash
rgas:*:1400:216:Radoslaw Gas:/home/dzienni/gr16ei/rgas:/bin/bash
rpleszyn:*:1125:306:Radoslaw Pleszyniak:/home/zaoczni/podyplom/rpleszyn:/bin/bash
rgolec:*:1530:246:Radoslaw Golec:/home/dzienni/gr46ei/rgolec:/bin/bash
rjakubow:*:1761:2000:Radoslaw Jakubowski:/home/dzienni/2000/rjakubow:/bin/bash
rkotzbac:*:1800:3001:Radoslaw Kotzbach:/home/zaoczni/2001/rkotzbac:/bin/bash
rkurzaws:*:1868:3001:Kurzawski Radoslaw:/home/zaoczni/2001/rkurzaws:/bin/bash
DUPA>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]