Skip to Content.
Sympa Menu

freetds - Re: [freetds] osql script

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] osql script
  • Date: Sat, 10 Mar 2012 13:22:30 -0500

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






Archive powered by MHonArc 2.6.24.

Top of Page