LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-04-2006, 01:30 AM   #1
adamrosspayne
LQ Newbie
 
Registered: Jun 2006
Posts: 19

Rep: Reputation: 0
entering variables using 'read' command: how to blank text?


hi all, In short, i want to blank out text, as i type it, when prompted by the 'read' command.

I use the "read" command in my script to get the variable $passwd.

echo please enter your password
read passwd

i then use this password variable, together with a username variable, to mount an smbfs share .

However, the password as it is typed, when prompted by the read command, is not blank. This is not the case if i just leave the password option out in the mount command, since the mount command will simply prompt for the password, and blank it out when it does so.

Since i use this one password over and over in the script, i dont want the user to enter it more than once. How can i blank it as it is typed?
 
Old 07-04-2006, 01:37 AM   #2
adamrosspayne
LQ Newbie
 
Registered: Jun 2006
Posts: 19

Original Poster
Rep: Reputation: 0
doh! always always read the man file newbies!! the way to hide text with a "read" command is by using the -s option :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
read values of variables from a table osio Programming 7 01-11-2006 02:52 AM
Delay in echo when entering text into Firefox 0.8 Shade Linux - Software 4 04-02-2004 12:01 PM
Problem with Geforce FX 5200 when entering text/console mode psandhu Linux - Newbie 3 03-22-2004 04:51 PM
When closing my graphics program & entering the application again the screen is blank armesk Programming 7 08-29-2003 01:16 PM
entering RedHat 7.2 in text mode kyutums Linux - Newbie 4 12-28-2001 03:06 AM


All times are GMT -5. The time now is 03:30 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration