diff options
| author | ruki <[email protected]> | 2023-09-14 17:23:38 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-14 17:23:38 +0800 |
| commit | d5d4cdf20ad56f7c9d1f6b2cd8890d4097b1b742 (patch) | |
| tree | c24b23d1225e090d7a7bcc93e222545a5de373e6 /scripts | |
| parent | 46129423f8fba04a12f971fa3a024f40c7c0bcb9 (diff) | |
| parent | 4ec625a8a1d7cae2be1a9d8a2bba25955a581b70 (diff) | |
Merge pull request #4201 from vic1707/patch-1
[INSTALL SCRIPT]: `grep` "unrecognized option: P" on `alpine`
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/get.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/get.sh b/scripts/get.sh index 34b6eef68..7440c072d 100755 --- a/scripts/get.sh +++ b/scripts/get.sh @@ -104,7 +104,7 @@ get_host_speed() { if [ `uname` == "Darwin" ]; then ping -c 1 -t 1 $1 2>/dev/null | egrep -o 'time=\d+' | egrep -o "\d+" || echo "65535" else - ping -c 1 -W 1 $1 2>/dev/null | grep -P -o 'time=\d+' | grep -P -o "\d+" || echo "65535" + ping -c 1 -W 1 $1 2>/dev/null | grep -E -o 'time=[0-9]+' | grep -E -o "[0-9]+" || echo "65535" fi } |
