Trying to set up ODBC on Ubuntu. osql is a great script to test it out, but running it on Ubuntu 10.10:

root:~# osql -S fcstest -U sa -P *****
osql: error: no potential directory strings in "/usr/local/bin/isql"
isql strings are:
+ /lib/

So inspecting the code, I can extract the meaningful parts on RHEL, where it works:

ISQL=$(command -v isql)
strings ${ISQL} | grep ^/

but on Ubuntu, the same sequence:

dchwalis:/usr/local/src$ strings ${ISQL} | grep ^/

Note the missing /usr/local/lib – the grep filters following will NEVER find any strings…

Maybe we should do this: RHEL:

$ ldd /usr/local/bin/isql => /usr/local/lib/ (0x00002b5b76eb4000)

and Ubuntu:

root:/usr/local/bin# ldd isql => /usr/local/lib/ (0x001cd000)

We can pull a path from that!