lmc999 / RegionRestrictionCheck

A bash script to check the status of your IP on various geo-restricted services.
GNU Affero General Public License v3.0
3.95k stars 536 forks source link

Docker版本报错 #110

Closed Ovear closed 5 months ago

Ovear commented 6 months ago

目前Docker镜像所使用的grep不支援-P选项,导致运行时会报错。

============[ Multination ]============
grep: unrecognized option: P
BusyBox v1.31.1 () multi-call binary.

Usage: grep [-HhnlLoqvsriwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE [FILE]...

Search for PATTERN in FILEs (or stdin)

    -H  Add 'filename:' prefix
    -h  Do not add 'filename:' prefix
    -n  Add 'line_no:' prefix
    -l  Show only names of files that match
    -L  Show only names of files that don't match
    -c  Show only count of matching lines
    -o  Show only the matching part of line
    -q  Quiet. Return 0 if PATTERN is found, 1 otherwise
    -v  Select non-matching lines
    -s  Suppress open and read errors
    -r  Recurse
    -i  Ignore case
    -w  Match whole words only
    -x  Match whole lines only
    -F  PATTERN is a literal (not regexp)
    -E  PATTERN is an extended regexp
    -m N    Match up to N times per file
    -A N    Print N lines of trailing context
    -B N    Print N lines of leading context
    -C N    Same as '-A N -B N'
    -e PTRN Pattern to match
    -f FILE Read pattern from file
grep: unrecognized option: P
scientificworld commented 6 months ago

遇到同样的问题。感觉是 87291b5 这个 commit 导致的?

zhyi828 commented 5 months ago

我试了一下iOS的iSH (busybox) 和macOS的zsh里面好像也都不支持-P,辛苦大佬帮忙看看能不能换一种写法呗? @lmc999

应该是这个时候改的:https://github.com/lmc999/RegionRestrictionCheck/commit/303a0d47a29590c9d236b82057d71bb4727cdd6a#diff-0abd00db4ac5f0e063b40d721c9faf3e2b6a016abbc365da431e83bc11d94faaR408

lmc999 commented 5 months ago

Fixed