[freetds] osql script
James K. Lowden
jklowden at freetds.org
Sat Mar 10 13:22:30 EST 2012
On Thu, 8 Mar 2012 11:05:03 -0500
David Venus <david.venus at bi-lo.com> wrote:
> After doing some testing with the osql script yesterday I found the
> following:
>
>
> - For AIX (at least at 6.1 and 7.1) the host command needs to have
> a "-n" switch to get the "new"
> format that the osql expects.
Dave, thanks for reporting this. I think of osql as an experiment in
Bourne shell script portability, something no sane person should ever
attempt. Based on reports here, it's easier than it once was. The
domination of Linux & BSD is evinced by the fact that yours is the
first AIX issue. Solaris can't be too popular either, because osql
won't run there. At least on the Solaris I've been using
lately, /bin/sh doesn't support the $() form of ``.
If you would please post your modified osql to this list (or send
it to me offlist) I'll happily merge in your changes. Please tell me
the output of uname(1) without options. I will add code something like:
if [ AIX = $(uname) ]
then
HOSTOPTS=-n
fi
HOSTCMD="host {$HOSTOPTS}"
and replace all references to host with ${HOSTCMD}.
--jkl
More information about the FreeTDS
mailing list