SyP-

menu2

Oct 22nd, 2020
1,289
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. echo ""
  2. i=1
  3. while IFS= read -r line
  4. do
  5.           OPTIONS[$i]=`echo $line | cut -d " " -f 2`
  6.           echo "[$i] ${OPTIONS[$i]}"
  7.           ((i++))
  8. done < "$TMPDATA"
  9.  
  10.  
  11.  
  12. while true; do
  13. echo ""
  14. read -p "Opcion: " OPTSELECT
  15. echo ""
  16. case $OPTSELECT in
  17.   [1-9]*) NETWORKS="${OPTIONS[$OPTSELECT]}"
  18.           break;;
  19.   *) echo "Número invalido. ";;
  20. esac
  21. done
  22. echo ""
  23. echo "Se ha seleccionado la red '$NETWORKS'"
  24. echo ""
  25.  
RAW Paste Data