Ask your own question, for FREE!
Computer Science 19 Online
OpenStudy (anonymous):

Unix question please: What is the difference between grep .... file.txt and grep -w .... file.txt What role does the wildcard play here? Like how is .... interpreted when it is all dots and no letters are used? Thank you.

OpenStudy (e.mccormick):

-w, --word-regexp Select only those lines containing matches that form whole words. The test is that the matching substring must either be at the beginning of the line, or preceded by a non-word constituent character. Similarly, it must be either at the end of the line or followed by a non-word constituent character. Word-constituent characters are letters, digits, and the underscore. From the man page.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!