Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

9
  • 6
    If you have a dash (-) at the end of the string this script will bring it as a result, which was not expected. Commented Nov 11, 2016 at 14:28
  • 1
    Correct @Evert : Words include only alpha chars, digits and underscores, so if you have abbreviations or other items hyphenated, this does not work. Commented Jan 31, 2017 at 21:10
  • @Cyrus I learnt the second one while using vi/vim * command on words. Commented Feb 13, 2018 at 19:35
  • It does not work for any special character it have for example org.apache.avro avro greped with org.apache.avro avro+mapred (tried with *) Commented Mar 28, 2019 at 1:30
  • 5
    @Evis Use grep -w "deiauk$" textfile instead. Commented Dec 28, 2020 at 22:41