Advertisement
Guest User

Untitled

a guest
May 29th, 2015
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #!/bin/bash
  2. id=(your-id1 your-id2)
  3. pass=(your-pass1 your-pass2)
  4. tv=('Your PC1' 'Your PC2')
  5.  
  6. ITEMS=""
  7. for item in {0..17}; do
  8. ITEMS=$ITEMS" $item ${tv[$item]}"
  9. echo $ITEMS
  10. done
  11.  
  12. OPTION=$(dialog --title "List file of directory /home" --menu "Chose one" 24 80 17 $ITEMS 3>&2 2>&1 1>&3) # show dialog and store output
  13. clear
  14. if [ $? -eq 0 ]; then # Exit with OK
  15. echo ${id[$OPTION]}
  16. echo ${pass[$OPTION]}
  17. ./teamviewer -i ${id[$OPTION]} --Password ${pass[$OPTION]}
  18. fi
  19. OPTION=""
  20. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement