Search

Making read invisible

The command read is used to accept values from the user or from files in scripting.

The default operation of read is to echo the characters entered by the user on the terminal, but if the the characters being entered are that of password we might want to make the characers inviible or not appear on the screen.

This can be done using the "-s" option with read i.e.



Whatever the user enters for the above read prompt, will not be displayed on the terminal.

No comments:

Post a Comment