What does this command do?
grep "\bi\b" linux.txt
What is it searching for?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
When used inside quotes (
\> work as word boundaries, as explained above.
When quotes are not used,
\\b has to be used instead of
grep i works but does not find whole words only
grep \bi\b does not work
grep \\bi\\b works
grep "\bi\b" works and it is the same as