Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Andrzej Piotrowski's ontape -a script worked with a here-document answering n, but a cron script running ontape -s -L 0 with an empty here-document still waited for a Return from the keyboard. Wolfgang Zager suggested an answer file of keystrokes; Andrzej said that failed too. Alex Barilo explained ontape -s also prompts about backing up the current log, so the here-document needs a reply (such as n) there as well.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Andrzej Piotrowski — — source: Informix-list mailing list archive (1991-1998)
I have a few scripts to backup my informix database.
In script set as ALARMPROG in onconfig I have following sequence:
.
.
.
/usr/informix/bin/ontape -a <<EOF
n
EOF
.
.
.
and it works fine.
Another script, that I am planning to put into cron, has a very similar
sequence:
.
.
.
/usr/informix/bin/ontape -s -L 0 <<EOF
EOF
.
.
.
but it does'n work, because, in this second case, ontape seems not to
read this Return character before EOF. As I have notticed running it at
command line, it expects hitting Return key directly from keyboard.
Anybody knows what is going on?
Thanks for any advice...
↪ replying to Andrzej Piotrowski
Wolfgang Zager — — source: Informix-list mailing list archive (1991-1998)
Hello Andrzej,
the easiest way will be to write an "answer-file" with all the keystrokes
You will need
during executing ontape, instead of using the EOF-logic. I used this in
works fine.
Wolfgang
Andrzej Piotrowski <a.piotrowski@apexim.com.pl> schrieb in im Newsbeitrag:
374BA075.6B95EB45@apexim.com.pl...
> I have a few scripts to backup my informix database.
> In script set as ALARMPROG in onconfig I have following sequence:
> .
> .
> .
> /usr/informix/bin/ontape -a <<EOF
>
> n
> EOF
> .
> .
> .
> and it works fine.
> Another script, that I am planning to put into cron, has a very similar
> sequence:
> .
> .
> .
> /usr/informix/bin/ontape -s -L 0 <<EOF
>
> EOF
> .
> .
> .
> but it does'n work, because, in this second case, ontape seems not to
> read this Return character before EOF. As I have notticed running it at
> command line, it expects hitting Return key directly from keyboard.
> Anybody knows what is going on?
> Thanks for any advice...
↪ replying to Wolfgang Zager
Andrzej Piotrowski — — source: Informix-list mailing list archive (1991-1998)
Wolfgang Zager wrote:
>
> Hello Andrzej,
>
> the easiest way will be to write an "answer-file" with all the keystrokes
> You will need
> during executing ontape, instead of using the EOF-logic. I used this in
> works fine.
>
> Wolfgang
[cut]
Hmm, I have done it before with the same result. What version of IDS do
You have ? Could You send me exact fragment of Your script with this
answer-file?
A.P.
↪ replying to Andrzej Piotrowski
Alex Barilo — — source: Informix-list mailing list archive (1991-1998)
In article <374BA075.6B95EB45@apexim.com.pl>,
Andrzej Piotrowski <a.piotrowski@apexim.com.pl> wrote:
> I have a few scripts to backup my informix database.
> In script set as ALARMPROG in onconfig I have following sequence:
> .
> .
> .
> /usr/informix/bin/ontape -a <<EOF
>
> n
> EOF
> .
> .
> .
> and it works fine.
> Another script, that I am planning to put into cron, has a very similar
> sequence:
> .
> .
> .
> /usr/informix/bin/ontape -s -L 0 <<EOF
>
> EOF
> .
> .
> .
> but it does'n work, because, in this second case, ontape seems not to
> read this Return character before EOF. As I have notticed running it at
> command line, it expects hitting Return key directly from keyboard.
> Anybody knows what is going on?
> Thanks for any advice...
>
This happens because ontape -s, just like ontape -a, prompts you if you would
like to back up your current log. In the first case you reply: 'n'. But in
the second you don't enter anything. So your DB archive is already on tape
and the utility waits for your input about the logs.
Alex.
--
Before the accident, I even could not spell UNIX
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.