![PS 보조 | grep 구성 대 ps aux | grep "confi[g]"](https://rvso.com/image/95511/PS%20%EB%B3%B4%EC%A1%B0%20%7C%20grep%20%EA%B5%AC%EC%84%B1%20%EB%8C%80%20ps%20aux%20%7C%20grep%20%22confi%5Bg%5D%22%20.png)
출력에 명령이 ps aux | grep
포함되어 있지만 포함되지 않는 이유를 알고 싶습니다 .grep
ps aux | grep "confi[g]"
$ ps aux | grep config
root 50 0.0 0.0 2548368 5760 ?? Ss 14Sep16 0:29.27 /usr/libexec/configd
emesa 20534 0.0 0.0 2434840 796 s002 S+ 4:41PM 0:00.00 grep config
대
$ ps aux | grep "confi[g]"
root 15776 0.0 0.0 2519824 940 ?? Ss Tue11AM 0:00.08 /System/Library/PrivateFrameworks/SystemAdministration.framework/XPCServices/writeconfig.xpc/Contents/MacOS/writeconfig
root 50 0.0 0.0 2547320 5740 ?? Ss 14Sep16 0:29.27 /usr/libexec/configd
답변1
grep "confi[g]"
명령이 다음을 검색하기 때문에"구성"문자열이고 두 번째 경우에는 grep "confi[g]"
명령에"구성"끈. 그것은 다음을 포함합니다"구성[g]"끈.
출력 에서 검색할 때 grep 명령 프로세스를 인쇄하지 않기 위해 일반적으로 사용되는 grep 트릭입니다 ps
.