How to make a cshell (csh) script interactive

Experts,

I tried to make my cshell script interactive by asking the user for password and trying to read the input using the "read" command. I have been unsuccessful so far. Do you have any idea ?

Thanks

Jim

1 Like
#!/bin/csh -f
stty -echo
echo -n "Password: "
set pword=$<
stty echo
echo ""
echo "You typed $pword"
1 Like

Thanks a ton!!! I never expected it to be so easy. Anyways easy things are often hard. Thanks once again.

Jim