[ale] Bash Scripting: How to pass "yes" + carriage return?
Christopher Bergeron
christopher at bergeron.com
Fri Nov 11 17:38:09 EST 2005
How about: echo -e "yes\n" | whatevercommand
-CB
Michael Still wrote:
>Maybe a better idea is to rename the old directory to something else
>before running the export command again and then deleting it later.
>What happens if you have a system failure during this backup process?
>
>On 11/11/05, Ryan Fish <FishR at bellsouth.net> wrote:
>
>
>>
>>Hello all,
>>
>>
>>
>>I am in need of figuring out how to pass a "yes" followed by a carriage
>>return via a bash script so a backup process can run successfully each day.
>>
>>
>>
>>The script does the following:
>>
>>
>>
>>1) ssh to RaQ server as root
>>
>>2) run cmuExport
>>
>>3) copies contents of export to NAS device
>>
>>
>>
>>Since cmuExport has been run before a prompt stating the directory the file
>>is written to already exists, do I want to overwrite is returned. The only
>>way to get past this point is to enter "y" then press ENTER at the prompt.
>>This is what I am attempting to automate.
>>
>>
>>
>>Thank you for any help offered!
>>
>>
>>
>>-Ryan
>>_______________________________________________
>>Ale mailing list
>>Ale at ale.org
>>http://www.ale.org/mailman/listinfo/ale
>>
>>
>>
>>
>
>
>--
>[stillwaxin at gmail.com ~]$ cat .signature
>cat: .signature: No such file or directory
>[stillwaxin at gmail.com ~]$
>_______________________________________________
>Ale mailing list
>Ale at ale.org
>http://www.ale.org/mailman/listinfo/ale
>
>
>
More information about the Ale
mailing list