DEC Digital Alpha VME 4/224 User Manual page 361

Table of Contents

Advertisement

+
Repeated matching.
When placed after a pattern, the plus sign indicates that the pattern
should match one or more times. For example, [0-9]+ matches any
sequence of one or more digits.
?
Optional matching.
When placed after a pattern, the question mark indicates that the
pattern can match zero or one times. For example, [a-z][0-9]? matches a
lowercase letter alone or followed by a single digit.
\ x
Prevents the character (denoted by x) following the backslash from
'
having special meaning.
file ...
Specifies the files to be searched. If you do not specify a file, the command
seaches STDIN.
Options
-c
Prints only the number of lines that matched.
-i
Ignores case in the search. By default, the grep command is case sensitive.
-n
Prints the line numbers of the matching lines.
-v
Prints all lines that do not contain the expression.
-f file
Take the regular expression from a file instead of the command line.
Examples
>>> ps | grep ewa0
1.
0000001f 0019e220 3
00000019 0018e220 2
00000018 0018f900 3
00000015 0019c320 5
00000013 001a2ce0 5
The output of the ps command (STDIN) is searched for lines containing
EWA0.
2 ffffffff 0
mopcn_ewa0 waiting on mop_ewa0_cnw
1 ffffffff 0
mopid_ewa0 waiting on tqe
3 ffffffff 0
mopdl_ewa0 waiting on mop_ewa0_dlw
0 ffffffff 0
tx_ewa0 waiting on ewa0_isr_tx
2 ffffffff 0
rx_ewa0 waiting on ewa0_isr_rx
grep
Console Commands 13–53

Advertisement

Table of Contents
loading

This manual is also suitable for:

Digital alpha vme 4/288

Table of Contents