com tput nao sei.. nem fui buscar...
wa...@wakku:~$ read -n1
<APERTEI ESC AQUI>
wa...@wakku:~$ cat -vet <<<$REPLY
^[$
wa...@wakku:~$ if [ "$(cat -vet <<<${REPLY})" == "^[$" ]; then echo ESC;
else echo NAO E ESC; fi
ESC
wa...@wakku:~$
--
Flávio do Carmo Júnior aka waKKu
2009/10/11 Ivan lopes <[email protected]>
>
>
> e o Esc ???? como faco??? Usando o tput
>
> if [ "$key" = $(tput cr) ]
> then key="Enter"
> elif [ "$key" = $(tput kcuu1) ]
> then key="Up"
> elif [ "$key" = $(tput kcud1) ]
> then key="Down"
> elif [ "$key" = $(tput kcub1) ]
> then key="Left"
> elif [ "$key" = $(tput kcuf1) ]
> then key="Right"
> fi
>
> [As partes desta mensagem que não continham texto foram removidas]
>
>
>
[As partes desta mensagem que não continham texto foram removidas]