From 3e8de7ce8aa2952b59c9aa2827e5970a96c44178 Mon Sep 17 00:00:00 2001 From: boboidream Date: Tue, 4 Sep 2018 10:13:19 +0800 Subject: [PATCH 1/2] [!] Fix parse error on macOS 10.13.6 --- hidpi.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hidpi.sh b/hidpi.sh index 70c98cd..5a2a75f 100755 --- a/hidpi.sh +++ b/hidpi.sh @@ -16,9 +16,9 @@ cat << EEF ============================================ EEF # - VendorID=$(ioreg -l | grep "DisplayVendorID" | awk '{print $8}') - ProductID=$(ioreg -l | grep "DisplayProductID" | awk '{print $8}') - EDID=$(ioreg -l | grep "IODisplayEDID" | awk '{print $8}' | sed -e 's/.$//' -e 's/^.//') + VendorID=$(ioreg -l | grep "DisplayVendorID" | awk '{print $NF}') + ProductID=$(ioreg -l | grep "DisplayProductID" | awk '{print $NF}') + EDID=$(ioreg -l | grep "IODisplayEDID" | awk '{print $NF}' | sed -e 's/.$//' -e 's/^.//') Vid=$(echo "obase=16;$VendorID" | bc | tr 'A-Z' 'a-z') Pid=$(echo "obase=16;$ProductID" | bc | tr 'A-Z' 'a-z') From 7cd6aae082e5905f1c0a0175eaa36527756b853c Mon Sep 17 00:00:00 2001 From: boboidream Date: Tue, 4 Sep 2018 10:14:26 +0800 Subject: [PATCH 2/2] [!] Fix parse error on macOS 10.13.6 --- hidpi-zh.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hidpi-zh.sh b/hidpi-zh.sh index 255152e..02e0357 100755 --- a/hidpi-zh.sh +++ b/hidpi-zh.sh @@ -16,9 +16,9 @@ cat << EEF ============================================ EEF # - VendorID=$(ioreg -l | grep "DisplayVendorID" | awk '{print $8}') - ProductID=$(ioreg -l | grep "DisplayProductID" | awk '{print $8}') - EDID=$(ioreg -l | grep "IODisplayEDID" | awk '{print $8}' | sed -e 's/.$//' -e 's/^.//') + VendorID=$(ioreg -l | grep "DisplayVendorID" | awk '{print $NF}') + ProductID=$(ioreg -l | grep "DisplayProductID" | awk '{print $NF}') + EDID=$(ioreg -l | grep "IODisplayEDID" | awk '{print $NF}' | sed -e 's/.$//' -e 's/^.//') Vid=$(echo "obase=16;$VendorID" | bc | tr 'A-Z' 'a-z') Pid=$(echo "obase=16;$ProductID" | bc | tr 'A-Z' 'a-z')