I have tested a few ways of doing this, but I get stuck at the:
Please mount tape 1 on /dev/rmt/1 and press Return to continue
...
We have a shell script that does the "ontape -a" that uses a command
line of
(echo "\n"; echo "n\n") | ontape -a
to get past the same message, but for some reason this doesn't work with
"ontape -s".
Any help would be greatly appreciated. Please send responses directly
to me at mailto:aa...@intraware.com and I will post a summary.
Thanks,
Aaron
--
Aaron Herskowitz Mailto:aa...@intraware.com
Systems Engineer Voice:510-253-4566
intraware Inc. Fax:510-253-4599
Send XL T-Shirts to 25 Orinda Way, Orinda, CA 94563
http://www.intraware.com
EOF
This is a Here-script. The second (empty) line stands for the RETURN
after "Please mount tape ... and press Return to continue...".
Hope this helps.
Best regards
Ruediger
echo "
" | ontape -s -L 0
The characters after the first " is not just the RETURN key. It is
ctrl-v ( meaning raw character ), and then ctrl-j ( for new line ).
this gives the <RETURN> sequence needed by ontape. it worked for
me all the time.
Ruediger Papke (Ruedige...@t-online.de) wrote:
:Aaron Herskowitz wrote:
...snip...
:> We have a shell script that does the "ontape -a" that uses a command
:> line of
:>
:> (echo "\n"; echo "n\n") | ontape -a
:>
:> to get past the same message, but for some reason this doesn't work with
:> "ontape -s".
Ruedige...@t-online.de (Ruediger Papke) wrote:
:Short Time -> Short Answer
:Please try this script:
:ontape -s -L 0 << EOF
:
:EOF
:
:This is a Here-script. The second (empty) line stands for the RETURN
:after "Please mount tape ... and press Return to continue...".
rs...@bcg.bad.com (Rs) wrote in another responce:
:Or you can try this :
:
:echo "
:" | ontape -s -L 0
:
:The characters after the first " is not just the RETURN key. It is
:ctrl-v ( meaning raw character ), and then ctrl-j ( for new line ).
:this gives the <RETURN> sequence needed by ontape. it worked for
:me all the time.
But in the excelent faq at http://www.iiug.org we find:
8.4 How can I run ontape/tbtape from a cron job?
echo '\n0' | tbtape -s 1 | head -100
The head cuts things off when tbtape gets into the infinite
"insert a tape and press any key to continue" thing. I have found that
normal output is well less than 100 lines. This
trick also seems to kill off the loose tbtape process too - but
I'm not sure why. Of course, YMMV.
By Martin Andrews (and...@ccfadm.eeg.ccf.org)
Note that recent releases of Informix engines have renamed the "tb*"
utilities to "on*"
The faq is allways a smart place to look.
Nils.My...@idg.no
NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway
My opinions are those of my company
The Informix FAQ is at http://www.iiug.org