From: Pussala on
I edit script for backup script for SPLAT:

#!/bin/sh
.. /etc/profile.d/CP.sh
cd /var/CPbackup/backups
backup -d --file /var/CPbackup/backups/
scp fw_export pl...(a)172.29.198.23:/data/backup
exit 0

But when the script exec backup command I have:
"Are you sure you want to proceed?"

I must write "yes+enter" but I want to automate doing write "yes +
enter" by the script.
Can I exec the backup command without me being asked "Are you sure you
want to proceed?" and without changing the source code of backup
command?
The command "echo |" not work !!!

Thanks
From: Jean-David Beyer on
Pussala(a)gmail.com wrote:
> I edit script for backup script for SPLAT:
>
> #!/bin/sh
> . /etc/profile.d/CP.sh
> cd /var/CPbackup/backups
> backup -d --file /var/CPbackup/backups/
> scp fw_export pl...(a)172.29.198.23:/data/backup
> exit 0
>
> But when the script exec backup command I have:
> "Are you sure you want to proceed?"
>
> I must write "yes+enter" but I want to automate doing write "yes +
> enter" by the script.
> Can I exec the backup command without me being asked "Are you sure you
> want to proceed?" and without changing the source code of backup
> command?
> The command "echo |" not work !!!
>
> Thanks

You might try

<< EOF
yes
EOF

as part of the command of whichever line up there is producing the prompt.

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 13:15:01 up 48 days, 18:17, 3 users, load average: 4.07, 4.16, 4.20
 | 
Pages: 1
Prev: Linux Job openings
Next: Docbook / SGML Reader