I'm a novice UNIX programmer (shell scripter?) and I recently wanted to make a program that uses the arrow keys. I know that the arrow keys generate "\033[A," "\033[B," etc., but when I try
read -n 1 input
if [ "$input" = "\033[A" ]
.....
the test always comes out negative. Is it a problem with read or test or what? What do I do?
read -n 1 input
if [ "$input" = "\033[A" ]
.....
the test always comes out negative. Is it a problem with read or test or what? What do I do?