I have a text file:
deiauk 1611516 afsdf 765
minkra 18415151 asdsf 4152
linkra sfsfdsfs sdfss 4555
deiauk1 sdfsfdsfs 1561 51
deiauk2 115151 5454 4
deiauk 1611516 afsdf ddfgfgd
luktol1 4545 4 9
luktol 1
and I want to match exactly deiauk
. When I do this:
grep "deiauk" file.txt
I get this result:
deiauk 1611516 afsdf 765
deiauk1 sdfsfdsfs 1561 51
deiauk2 115151 5454 4
but I only need this:
deiauk 1611516 afsdf 765
deiauk 1611516 afsdf ddfgfgd
I know there's a -w
option, but then my string has to mach whole line.
grep -w
? (That option is exactly for that purpose, and it works for me.) - Note: option-x
matches the whole line.deiauk
/ "I only need this:deiauk 1611516 afsdf 765
" - which do you need?