3
1
How can I grep for lines of a file wich start with a certain string?
For example, all lines with prefex 0x
, where the file has the lines
0x002
0x003
abc
Output should be
0x002
0x003
3
1
How can I grep for lines of a file wich start with a certain string?
For example, all lines with prefex 0x
, where the file has the lines
0x002
0x003
abc
Output should be
0x002
0x003
10
grep '^0x'
^
means the starting of a line
e.g.
kent$ echo "0x002
0x003
abc
"|grep '^0x'
0x002
0x003