How does ps aux | grep '[p]attern' exclude grep itself?

前端 未结 1 1164
南方客
南方客 2021-01-21 05:24

The title says it all. I\'ve seen this idiom used alot instead of adding an additional grep -v grep in some ps pipeline. For example it could be used l

相关标签:
1条回答
  • 2021-01-21 06:18

    The pattern [f]irefox will not match the literal string [f]irefox. Instead it will match strings with exactly one char from the 1-character class [f], followed by irefox.

    0 讨论(0)
提交回复
热议问题