LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-10-2010, 07:04 PM   #1
babysoft
LQ Newbie
 
Registered: Feb 2010
Posts: 4

Rep: Reputation: 0
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
 
Old 03-10-2010, 07:34 PM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Jessie (Fluxbox WM)
Posts: 1,387
Blog Entries: 52

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
You can use the yes to pipe a 'y' response to the standard input of another command, eg
Code:
yes | cmd
 
Old 03-11-2010, 08:56 AM   #3
babysoft
LQ Newbie
 
Registered: Feb 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks a lot! that did the trick.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to pass command-line parameter to shell script? Kropotkin Linux - Newbie 12 07-25-2011 10:24 AM
pass parameter in command line lingyun Linux - Newbie 4 04-21-2009 11:42 PM
how to pass the parameter to command sed linux_1 Linux - Enterprise 3 10-15-2007 08:10 PM
gtk - How to pass in a parameter Ian D Programming 4 10-28-2005 12:23 PM
PHP Pass Parameter Gerardoj Programming 2 05-25-2004 09:12 AM


All times are GMT -5. The time now is 08:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration