diff options
| author | ruki <[email protected]> | 2021-03-10 23:44:28 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-03-10 23:44:28 +0800 |
| commit | 0084557aa9019b75f94e64873643c19537f13c32 (patch) | |
| tree | 03840f591ecf8aeac478c50e917479c1c100e755 /scripts | |
| parent | 548a0ad47f341bee0d757be53e478697decc39a5 (diff) | |
fix get.sh
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 3c0562aba..f6ba9d49a 100755 --- a/scripts/get.sh +++ b/scripts/get.sh @@ -50,7 +50,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 | egrep -o 'time=\d+' | egrep -o "\d+" || echo "65535" + ping -c 1 -W 1 $1 2>/dev/null | grep -P -o 'time=\d+' | grep -P -o "\d+" || echo "65535" fi } |
