Call interactive bash shell scripts

Hi Guys,

In Chef Is there any way to call interactive bash shell scripts ? If yes, How ?

I have to automate my environment so in some tasks we are running shell scripts interactively, so how can we achieve this through Chef ?

I did it by creating a answer script (./ < answer) or use Autoexpect

It depends on what responses the scripts expect. If it only expects a “yes” response, the yes program may be all you need:

yes |

If the responses are more complicated, maybe a response file or a HERE document may help: <<ENDMYSCRIPT

If the script doesn’t accept input on stdin but through some other mechanism, you might have to bring out the big guns as Nick suggested.

Kevin Keane
Whom the IT Pros Call
The NetTech
Our values: Privacy, Liberty, Justice