Use grep instead of perl

This commit is contained in:
Filriya 2020-04-02 14:02:17 +09:00
parent d9aae35e66
commit 99aafee0d8

View file

@ -9,7 +9,7 @@ ram_percentage_format="%3.1f%%"
sum_macos_vm_stats() {
cat - \
| perl -pe "s/^[^\d]*([\d]*)\./\1/g" \
| grep -o [0-9]* \
| awk '{ a += $1 * 4096 } END { print a }'
}