I have three files testx
,testy
and testz
all in same directory Sikh
. All three files contain same data or content. The contents are:
aaabb Aaaaa AAAAA
bbbcc Bbbbb BBBBB
ff–ff Ccccc CCCCC
cccdd Ddddd DDDDD
Now I want to display the text containing A
in all three files. What I have done so far is:
grep '^A'*
But it does not display anything. So can anyone help me sort this out.
grep ^A
will show you lines starting with Agrep --no-filename A test?
seems to work fine. Just loose the^
(which means at the beginning of a line) and optionally add a-h
or--no-filename
to supporess printing the filenames in front of the pattern). Note thattest?
will match textx, testy and testz, but that*
is also quite valid here.