Help require in expect script
2 Attachment(s)
Hi,
I have prepared two script ,[please find the attachment] 1.mypass_root.sh --- shell 2.passwd_root.expect ---- expect 1.mypass_root-->This will take the input from the user & calling the second script. I am passing the shell variable through "PUTS" in expect script. problem is whenever i am running the scripts it is showing the o/p (mentioned in red) whatever it is taking from the 1st script. $ ./mypass_root.sh Enter your Lan id:testuser Enter your Lan id password Enter the current password of root: Enter the account name for which you want to change the password: enter the newpassword testuser testuser XUdKfZn7 testuser test I am able to understand that these o/p are showing because of the following lines in the 2nd scripts puts $env(lanid) puts $env(lanpass) puts $env(rootpass) puts $env(accname) puts $env(accpass) But not able to hide it.Please let me know if you can help me to hide it. I have attached the two scripts. |
Try to put '-s' switch right after read.
read -s lanpas <- example Hope it helps |
All times are GMT -5. The time now is 03:59 AM. |