I'm trying to grab words from a file:
$ grep -o '\*\*[^*]*\*\*' Principles_20_LifePrinciples.md | grep -v -e "Origin" -e "Etymology"
**circumstance**
**case**
**condition**
**Anxiety**
**anxiety**
**the state of feeling nervous or worried that sth bad is going to happen**
**a worry or fear about sth**
**a strong feeling of wanting to do sth or of wanting sth to happen**
The result I intend is to get only words:
**circumstance**
**case**
**condition**
**Anxiety**
**anxiety**
Refactored code with specified quantifiers {,20}
:
$ grep -E -o '\*\*[^*]{,20}\*\*' Principles_20_LifePrinciples.md
Unfortunately, it returns nothing.
How to solve such a problem?
grep
command worked for me. Which version of Ubuntu are you using and what is the output ofgrep --version
?