read_reg.sh 258 B

12345678910111213141516
  1. #!/bin/sh
  2. # A POSIX variable
  3. OPTIND=1 # Reset in case getopts has been used previously in the shell.
  4. # Initialize our own variables:
  5. reg=0x9000
  6. while getopts "r:" opt; do
  7. case "$opt" in
  8. r) reg=$OPTARG
  9. ;;
  10. esac
  11. done
  12. pci -r $reg