Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Read in Korn Shell
Name: DaBuggin1 Date: June 11, 2003 at 17:23:06 Pacific OS: linux8.0 CPU/Ram: dual xeon, 2GB ram
Comment:
I have written a script to login to various network equip and perform automated functions. Is there a way to hide the input from the keyboard on read in Korn shell.
read USER?"UBR Login:" read PASS?"UBR Password:"
Currently, when the script is run, anyone looking over your shoulder can read your password. Is there a switch to do this?
if anyone needs something like this, here you go. if you know of a better way, please post.
0
Response Number 2
Name: nails Date: June 11, 2003 at 21:56:07 Pacific
Reply:
Hi:
I don't know of any way of turning off echoing without modifying the terminal driver:
!/bin/ksh
# get_passwd: This function saves the current terminal settings and # sets the terminal to no echo and disables the interrupt key with the # unix stty command. Enter the password and # reset original terminal settings # with stty before returning the password to the calling script. function get_passwd { local password oldstty
Summary: I wish to handle the cursor in korn shell when I test a choice but I want that the cursor don't go in a new line. In this case: print -n "Yes or No >> " read a if [[ etc. read a (le cursor not in a...
Summary: hi, i want to create a directory from my cgi script written in korn shell. but there is no out put. means that this script work for other commands like ls and cd but don't work fo mkdir commands. here...
Summary: When trying to escape special character * - it doesn't seem to work. In korn shell trying to store a local variable as follows sample=test* echo $sample - gets all the file names starting with test* ,...