First of all i am using solaris 10. I want to write a script that ask user to enter password and read the character input from keyboard. The ask to re-enter the password and then if they are match it will accept.
But my problem is I want to echo a '*' character instead of the character I entered from keyboard, Please help me with this....
I know how to hide by turning off echo as 'stty -echo' but i want to display '*' character. Will it be possible?
In your script the key combination for backspace is \\b\\c. How did you get that ? And how do you go about getting the key combination for other characters ?
The \c means don't print a newline (in some versions of echo) and \b is backspace. Read the documentation for your echo (or maybe printf) to see the available escape codes. Basically it's just ASCII anyway. The backslashes are doubled because the shell eats one level (or you could use single quotes).