Problem on write menu at ssh2!

From: Theo Ng (theo.ng@polyu.edu.hk)
Date: Mon Apr 08 2002 - 05:09:29 EDT


Dear All,

First of all, thank you so much for you help!!

I wrote a menu on ssh2 which help colleague to simple the system call. I
can use that menu successfully at telnet function. When I try to use it, i
discovered that ssh2 cannot accept input. my menu at below:

#!/bin/sh
/bin/echo "Welcome!

1 See today's date
2 See who's logged in
q Quit"

/bin/echo "Your choice: \c"
read ans
while [ "$ans" != "q" ]
do
   case "$ans" in
   1)
       /bin/date
       ;;
   2)
       /bin/who
       ;;
   q)
       /bin/echo "Goodbye"
       exit 0
       ;;
     *)
       /bin/echo "Invalid choice"
       ;;
   esac
   /bin/echo "Your choice: \c"
   read ans
done
exit 0

While I login using ssh2, not input prompt appear, just loop and display
"Invalid choice". Someone status that I need to enable accept stdin at
ssh2. Is I need to do it?

Thank you so much.

Best Regards,
Theo

_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:24:10 EDT