grep: unrecognized option: P

1 개요[ | ]

grep: unrecognized option: P
grep -oP 정규식
## 대신 ##
grep -oE 정규식

2 GNU grep[ | ]

[root@localhost ~]# grep -V | head -1
grep (GNU grep) 2.20
[root@localhost ~]# echo hello world | grep -oP ll[^l]*
llo wor

3 BusyBox grep[ | ]

# grep 2>&1 | head -1
BusyBox v1.32.1 () multi-call binary.
# echo hello world | grep -oP ll[^l]*
grep: unrecognized option: P
BusyBox v1.32.1 () multi-call binary.

Usage: grep [-HhnlLoqvsrRiwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE [FILE]...
...
# echo hello world | grep -oE ll[^l]*
llo wor

4 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}