Is there any way so that i can echo password when asked for in unix shell without use of external binaries ? Something like simple function triggered when password prompt is displayed
+1
A:
Are you aware of Expect?
Perhaps this falls in the "external binaries" category, but if it does, then your question needs clarification.
ΤΖΩΤΖΙΟΥ
2008-10-03 12:05:38
Can you clarify this question?
Bartosz Blimke
2008-10-03 12:11:44
What is the controlling entity that will "echo" the password to another program?
ΤΖΩΤΖΙΟΥ
2008-10-03 13:41:47
Should be added as extra information to the question or as a comment on the other answer.
workmad3
2008-10-03 12:16:55
+1
A:
Short answer: no.
Slightly longer answer: the usual shells, sh, ksh, csh, tcsh, bash do not have any hooks for you to hang actions on (OK, so bash2 has context sensitive tab-completion).
On the other hand. The shell is just a program. You can replace it. If you can really say what you want to do you can hack and existing shell or write a new one to get the desired behavior...
dmckee
2008-10-03 14:56:31