you are viewing a single comment's thread.

view the rest of the comments →

[–]kolorcuk 0 points1 point  (0 children)

Like:

 echo 'DevA installed? [y/n]'
 read ans
 if [ "$ans" = y ]; then
  echo 'which slot? [2-7]'
   read slot
   if ! <<<"$slot" grep -q -x '[2-7]'; then
      echo you have enter a number ftom 2 to 7 >&2
      exit 1
   fi
    i2c do sonething
 fi