Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grep regex NOT containing string #19

Open
lmquang opened this issue Feb 28, 2018 · 0 comments
Open

Grep regex NOT containing string #19

lmquang opened this issue Feb 28, 2018 · 0 comments

Comments

@lmquang
Copy link
Owner

lmquang commented Feb 28, 2018

grep matches, grep -v does the inverse. If you need to "match A but not B" you usually use pipes:

grep "${PATT}" file | grep -v "${NOTPATT}"

https://stackoverflow.com/questions/10411616/grep-regex-not-containing-string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant