| Author |
Writing input data to a properties file
|
Srinivas Rao Marri
Greenhorn
Joined: Jun 07, 2006
Posts: 11
|
|
Hi, I want to write a shell script for entering user name and password and store it into a properties file in OS. How can i do this? Regards Srinivas
|
 |
Brian Wright
Greenhorn
Joined: Dec 12, 2005
Posts: 11
|
|
#!/usr/bin/ksh # use \c to suppress the default newline echo "Enter userid: \c" read USERID # use \c to suppress the default newline echo "Enter password: \c" # set alt character set to obscure the password tput smacs read PASSWORD # reset to standard character set tput rmacs echo ${USERID}:${PASSWORD} >> output.file It's pretty basic but it'll do the job, if I understand your requirements correctly. You could always loop it until you select 'q' to quit or the like, depending on how sophisticated you want to make it.
|
 |
 |
|
|
subject: Writing input data to a properties file
|
|
|