Question

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

Was it helpful?

Solution

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...

OTHER TIPS

Are you aware of Expect?

Perhaps this falls in the "external binaries" category, but if it does, then your question needs clarification.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top