home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / boot / i386 / rescue / usr / bin / termprobes < prev    next >
Text File  |  2006-11-29  |  681b  |  36 lines

  1. #!/bin/bash
  2.  
  3. # Peter Poeml <poeml@suse.de>
  4.  
  5. DA="\033[c"
  6. OLD_TERM_ID="\033Z"
  7. DA1="\033[1c"
  8. EXT_DA="\033[?1;1c"
  9. SEC_DA="\033[>c"
  10. ANSWERBACK="\005"
  11. TITLE="\033[21;t"
  12.  
  13. GO_LEFT="\033[80D"
  14. GO_MIDDLE="$GO_LEFT\033[15C"
  15. GO_RIGHT="$GO_LEFT\033[40C"
  16.  
  17.  
  18. echo
  19. echo -e Probe "$GO_LEFT$GO_MIDDLE" Escape sequence "$GO_LEFT$GO_RIGHT" Reply
  20.  
  21. for i in DA OLD_TERM_ID DA1 EXT_DA SEC_DA ANSWERBACK TITLE; do
  22.  
  23.     echo
  24.     #eval "echo -en $i " "  \$$i"
  25.     eval "echo -en $i\"$GO_MIDDLE\";         \
  26.           echo -n \$$i;                 \
  27.           echo -en \"$GO_RIGHT\"\$$i"
  28.     test -x /bin/usleep && usleep 500000 || sleep 1
  29.  
  30. done
  31.  
  32. test -x /usr/bin/setterm && setterm -cursor on
  33.  
  34. echo -e "\n\npress enter to quit"
  35. IFS="\n"; read a
  36.