Answered dbtool in a script

ron

Member
AIX 7.1, OE10.2B

I am trying to get a script to run dbtool to check/amend sqlwidths.

It is just in a test form. No problem running the script - but I'm having trouble capturing the output (ie, results). Below is my latest effort - but I have also tried >$log 2>&1 on the "dbtool" statement. In all cases the script captures the menu and options. Some attempts send the dbtool output to the screen - sometimes it just disappears. But I can't get it into the log file. What I am I doing wrong?

Code:
#!/bin/ksh93
 
log=/tmp/dbtool.$$
exec 1>>$log
exec 2>&1
 
dbtool testdb <<!
2
1
5
all
all
0
!
 
Top