send automatic input to a script called by another script in bash programming
Hi, I am working on a bash script in which I have to call another script that prompts for data from the user, the problem is that the data that it prompts I want to fill it automatically so the user only have to run my script and fill the data from the script I call from my own script. I used to do that with the expect library but I donṫ want to use it on this one and use only bash programming.
Does anybody knows how to send this data to the other script from the parent script? I hope I made myself clear... Thanks for the help!!! Jorge |
Code:
#!/bin/bash |
Re: send automatic input to a script called by another script in bash programming
Quote:
Except... if you don't spawn that new process. If you run script B in the same process, you can see B's variables. Try the following Code:
#!/bin/bash Code:
#!/bin/bash Anyway, hope this helped. Good luck, Rick |
All times are GMT -5. The time now is 05:15 AM. |