Quote:>hi, can anyone help me. I tried to make a case script to insert in my
>.login file but it didn't work. It looks like this:
>echo "Please choose:"
>echo "(D)irectory (L)ogoff (S)hell"
>case $choice in
>D) ls -al;;
Well, a couple of things wrong here:
a) a case needs to end with the string "esac"
b) if you're using .login then you quite likely logging
on to csh & then `case' is not going to work as you plan.
If you really want the above menu, as given, to be called from .login
one thing you could try is putting:
as the last line in your .login (you need not exec it if you don't
really want that puzzling L option, but if you do, you'll need it for
"exit" to actually log you out)
If you had bash as your shell you could toss the top line and append
the rest to your .bash_profile
echo "Please choose:"
echo "(D)irectory (L)ogoff (S)hell"
case $choice in
D) ls -al;;
L) echo Hey you just got here! Oh, well; exit;;
S) echo hmm; cd;;