LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to pass response as command parameter? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-pass-response-as-command-parameter-794543/)

babysoft 03-10-2010 06:04 PM

how to pass response as command parameter?
 
Hey... Could really use some help with this situation.

I have a backup schedule running a full backup everyday. I'm using webmin to manage these backup now. The problem is when the dump command sends a prompt asking if we want to rewrite the tape, Webmin does not display this prompt and we end up having to terminate the backup -> erase the tape(which takes a long time) and then run the backup again.

I was wondering if there is a technique that could be used to pass "Yes" as a parameter to the dump command, much like in windows? or if there is a more efficient way of getting this done, i would be very open to this

neonsignal 03-10-2010 06:34 PM

You can use the yes to pipe a 'y' response to the standard input of another command, eg
Code:

yes | cmd

babysoft 03-11-2010 07:56 AM

Thanks a lot! that did the trick.


All times are GMT -5. The time now is 06:20 AM.