08-25-2004
hidden output
Hello All,
I have a shell script, which is login user to database, prompting to enter username, password and database instance. I would like to hide password. Can someone tell me how to do that (if it is possible), so script's output could look something like this:
%dblogin.ksh
Please, Enter user name:
user
Your password:
Database Instance:
DB
UserName: user
Password:
DB: DB
function DBLogin {
while true
do
print "Please, Enter user name: "
read input
UserName=$input
print "Your password: "
read input
Password=$input
print "Database Instance: "
read input
DB=$input
print "UserName: $UserName"
print "Password: $Password"
print "DB: $DB"
break
done
sqlplus $UserName/$Password@$DB
return;
}
Any other suggestions are more than welcome!
Many thanks in advance!
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Upon executing a script that sets the value to a password variable, is there a way to hide a password value from being detected in standard out? (2 Replies)
Discussion started by: neto
2 Replies
2. Shell Programming and Scripting
Hi. I have a script which is deleting files with a particular extension and older than 45 days.The code is:
find <path> -name "<filename_pattern>" -mtime +45 -exec rm {} \;
But the problem is that some important files are also getting deleted.To prevent this I have decide to make a dummy... (4 Replies)
Discussion started by: pochaw
4 Replies
3. UNIX for Advanced & Expert Users
Hello All,
I'm trying to parse through a file and display all the hidden characters, including all carriage and line returns. I usually use cat -v, but this doesn't display the carriage and line returns. Does anyone know how this can be done?
Thanks
Khoom (5 Replies)
Discussion started by: Khoomfire
5 Replies
4. Shell Programming and Scripting
Hi guys!
I need to know how I can move hidden folders because I have a script that backs up my svn projects everyday and I have 2 backup folders "Today" and "Yesterday". It is like this:
Thanks a lot (2 Replies)
Discussion started by: ruben.rodrigues
2 Replies
5. Shell Programming and Scripting
I know that cat -v will show me hidden characters in a file....
I for some reason seem to think that there's a bash command that will show me hidden characters in a variable in a script? Or am I just imagining it?
Thanks in advance (8 Replies)
Discussion started by: Bashingaway
8 Replies
6. UNIX for Dummies Questions & Answers
I usually use ls -al | awk '{sum = sum + $5} END {print sum}' to sum the size of all files in a directory. However this command includes the hidden files.
Is there a command to just add up all the files/sub-directories excluding the hidden files (begins with . and ..)
I wanted to check the... (10 Replies)
Discussion started by: lhareigh890
10 Replies
7. UNIX for Dummies Questions & Answers
How to list out only the hidden files from a directory ?
Thanks (4 Replies)
Discussion started by: pandeesh
4 Replies
8. UNIX for Dummies Questions & Answers
I want to list all directories hidden or not hidden.
ls -ld */ => shows only not hidden directories
so i guess the answer would be to add the a option to show all files
ls -lad */ => not working :confused:
ls -la | grep "^d" => works
But I would like to know why I can't use ls -lad... (4 Replies)
Discussion started by: servus
4 Replies
9. Shell Programming and Scripting
Hello.
I use this command :
rsync -av --include=".*" --dry-run "$A_FULL_PATH_S" "$A_FULL_PATH_D"The data comes from the output of a find command.
And no full source directories are in use, only some files.
Source example... (2 Replies)
Discussion started by: jcdole
2 Replies