Need a Script!!!

Hi,

I need a script which should ask for "enter the command" and once we give top or bdf, it should display the output of that particular command and it should display "Enter the command" again.
I need this only for top and bdf commands.
On giving exit, it should exit from the server entirely!!

Kindly help me!!

Thanks in Advance!!

Sridhar

well which one is your shell,,is it Ksh or Bash so first line will determine this parameter as

#!/bin/bash or #!/bin/ksh {depends on ur platform}

#then simply you can use any style via

echo "enter a utilty you wanna use top (1) or bdf (2) & 3 for exit"
read option
case $option in
1) /usr/bin/top ;; #please give complete path
2) /usr/bin/bdf ;; #same for here too
3) exit 0 ;;

esac

You don't need bash or korn for that, and bourne works everywhere, #!/bin/sh
Also, add a while loop to get the full functionality the OP is after.
:wink: