dip_switch.sh 276 B

12345678910111213
  1. #!/bin/sh
  2. # get led status
  3. ec_suspend=`echo "111111" | sudo -S ls`
  4. dipdata5=`sudo ./dip_switch/dip 5 | grep -s "GPIO1 status" | awk '{print $4}'`
  5. dipdata6=`sudo ./dip_switch/dip 6 | grep -s "GPIO2 status" | awk '{print $4}'`
  6. dipdata=$((dipdata5+dipdata6))
  7. echo $dipdata