[!] Fix parse error on macOS 10.13.6

This commit is contained in:
boboidream 2018-09-04 10:13:19 +08:00 committed by GitHub
parent 198a85080f
commit 3e8de7ce8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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')