How to hide user inputted text for interactive unix shell script?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to hide user inputted text for interactive unix shell script?
# 1  
Old 04-04-2006
How to hide user inputted text for interactive unix shell script?

Hi everybody,

Do you know how to hide the text for interactive unix shell script? Just like the case for inputting password during logon.

Patrick
# 2  
Old 04-04-2006
Do you mean to prevent echoing user input?

Code:
echo "enter something \c"
stty -echo
read something
stty echo

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Recording user input from interactive shell script

Hello, I want to start out by saying that I am fairly new to scripting and am looking for someone that can point me in the right direction. Basically what I need is a way to run a interactive script that will prompt users with questions weather that be yes/no or a specific answer.. I want to be... (3 Replies)
Discussion started by: shoutcast
3 Replies

2. Homework & Coursework Questions

How to set a non-login non-interactive shell for a user?

I am sorry for creating a new topic after my previous inquiry was closed, but I tried and tried and I do not know how to edit my previous post. This is not exactly any homework, this is one of 40 questions we were expected to prepare for one of the labs. I searched and read what I could and still... (4 Replies)
Discussion started by: me_me_me
4 Replies

3. UNIX for Dummies Questions & Answers

Shell script to read lines in a text file and filter user data Shell Programming and Scripting

sxsaaas (3 Replies)
Discussion started by: VikrantD
3 Replies

4. Programming

How to hide from UNIX strings - obfuscate or hide a literal or constant?

Hi, I need to somehow pipe the password to a command and run some SQL, for example, something like echo $password | sqlplus -s system @query01.sql To make it not so obvious, I decided to try out writing a small C program that basically just do echo $password. So now I just do x9.out | sqlplus... (8 Replies)
Discussion started by: newbie_01
8 Replies

5. Shell Programming and Scripting

How to read the user inputted file name?

hello, I have prepared a script ------------------------------------------------ #!/bin/sh cat test.txt| sed '1d' | sed '$d' > /tmp/tmp1.txt while read line do typeset -i count=`echo $line | tr ' ' '}' | wc -c` finalcount=`expr $count - 1` echo $finalcount done <... (12 Replies)
Discussion started by: rac
12 Replies

6. Shell Programming and Scripting

Help to hide shell terminal and run prompt program after ssh login for specified user

Hey guys, I have some task from my office to lock user on the specified directory after the user logged on using ssh. And then run prompt program to fill the required information. Yeah, just like an ATM system. My question: How could I do those?? AFAIK I have to edit the ~./bashrc. But the... (1 Reply)
Discussion started by: franzramadhan
1 Replies

7. Shell Programming and Scripting

Interactive script to give user option of what text to add

Hello all, I have created a script that will remove the first two lines of one text file (body.txt) and then add the text from a different text file (header.txt) directly to the beginning of the freshly modified body.txt file. It is as follows: #!/bin/bash ## This script will add a header... (2 Replies)
Discussion started by: marcozd
2 Replies

8. Homework & Coursework Questions

Need User Inputted Date

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I'm making my first program with perl and am supposed to allow the user to either use the current date or enter a... (0 Replies)
Discussion started by: Zamereon
0 Replies

9. Homework & Coursework Questions

Help with Interactive / Non Interactive Shell script

Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines. It then prompts for deletion of the file. If user supplies arguments with the script , then it works on those files... (1 Reply)
Discussion started by: rits
1 Replies

10. Shell Programming and Scripting

Substituting a user Inputted word into a command

I am creating a menu driven system and i want to show the last login times of different users, instead of using the 'last' command i wanted to know if there is anyway i could make a brief search tool where the user can input which user they are looking for and then the login times for that specific... (2 Replies)
Discussion started by: warlock129
2 Replies
Login or Register to Ask a Question