Linux sagir-us1.hostever.us 5.14.0-570.51.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 8 09:41:34 EDT 2025 x86_64
LiteSpeed
Server IP : 104.247.108.91 & Your IP : 216.73.216.105
Domains : 74 Domain
User : georgeto
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
local /
emps /
bin /
Delete
Unzip
Name
Size
Permission
Date
Action
annotate
13.05
KB
-rwxr-xr-x
2025-02-06 06:36
autoconf
14.32
KB
-rwxr-xr-x
2025-02-06 06:34
autoheader
8.43
KB
-rwxr-xr-x
2025-02-06 06:34
autom4te
31.48
KB
-rwxr-xr-x
2025-02-06 06:34
autopoint
23.93
KB
-rwxr-xr-x
2025-02-06 06:38
autoreconf
20.68
KB
-rwxr-xr-x
2025-02-06 06:34
autoscan
16.82
KB
-rwxr-xr-x
2025-02-06 06:34
autoupdate
33.17
KB
-rwxr-xr-x
2025-02-06 06:34
bdftogd
3.9
KB
-rwxr-xr-x
2025-02-06 06:36
bsqldb
41.76
KB
-rwxr-xr-x
2025-02-06 06:36
bunzip2
281.44
KB
-rwxr-xr-x
2025-02-06 06:35
bzcat
281.44
KB
-rwxr-xr-x
2025-02-06 06:35
bzcmp
2.08
KB
-rwxr-xr-x
2025-02-06 06:35
bzdiff
2.08
KB
-rwxr-xr-x
2025-02-06 06:35
bzegrep
1.64
KB
-rwxr-xr-x
2025-02-06 06:35
bzfgrep
1.64
KB
-rwxr-xr-x
2025-02-06 06:35
bzgrep
1.64
KB
-rwxr-xr-x
2025-02-06 06:35
bzip2
281.44
KB
-rwxr-xr-x
2025-02-06 06:35
bzip2recover
32.6
KB
-rwxr-xr-x
2025-02-06 06:35
bzless
1.23
KB
-rwxr-xr-x
2025-02-06 06:35
bzmore
1.23
KB
-rwxr-xr-x
2025-02-06 06:35
c_rehash
6.73
KB
-rwxr-xr-x
2025-02-06 06:21
captoinfo
63.09
KB
-rwxr-xr-x
2025-02-06 06:26
cjpeg
40.01
KB
-rwxr-xr-x
2025-02-06 06:36
clear
8.4
KB
-rwxr-xr-x
2025-02-06 06:26
clusterdb
81.69
KB
-rwxr-xr-x
2025-02-06 06:34
createdb
85.82
KB
-rwxr-xr-x
2025-02-06 06:34
createuser
82.08
KB
-rwxr-xr-x
2025-02-06 06:34
curl
242.62
KB
-rwxr-xr-x
2025-02-06 06:35
curl-config
5.67
KB
-rwxr-xr-x
2025-02-06 06:35
datacopy
27.06
KB
-rwxr-xr-x
2025-02-06 06:36
defncopy
28.1
KB
-rwxr-xr-x
2025-02-06 06:36
derb
30.93
KB
-rwxr-xr-x
2025-02-06 06:39
djpeg
35.71
KB
-rwxr-xr-x
2025-02-06 06:36
dropdb
76.97
KB
-rwxr-xr-x
2025-02-06 06:34
dropuser
76.91
KB
-rwxr-xr-x
2025-02-06 06:34
ecpg
981.39
KB
-rwxr-xr-x
2025-02-06 06:34
envsubst
43.1
KB
-rwxr-xr-x
2025-02-06 06:38
fisql
38.98
KB
-rwxr-xr-x
2025-02-06 06:36
fpmctl
1.73
KB
-rwxr-xr-x
2025-02-06 06:43
freebcp
27.38
KB
-rwxr-xr-x
2025-02-06 06:36
freetype-config
3.63
KB
-rwxr-xr-x
2025-02-06 06:36
gd2copypal
8.55
KB
-rwxr-xr-x
2025-02-06 06:36
gd2togif
8.5
KB
-rwxr-xr-x
2025-02-06 06:36
gd2topng
12.6
KB
-rwxr-xr-x
2025-02-06 06:36
gdcmpgif
12.59
KB
-rwxr-xr-x
2025-02-06 06:36
gdparttopng
8.6
KB
-rwxr-xr-x
2025-02-06 06:36
gdtopng
8.5
KB
-rwxr-xr-x
2025-02-06 06:36
genbrk
18.49
KB
-rwxr-xr-x
2025-02-06 06:39
gencfu
13.91
KB
-rwxr-xr-x
2025-02-06 06:39
gencnval
27.41
KB
-rwxr-xr-x
2025-02-06 06:39
gendict
29.24
KB
-rwxr-xr-x
2025-02-06 06:39
genrb
140.38
KB
-rwxr-xr-x
2025-02-06 06:39
gettext
42.52
KB
-rwxr-xr-x
2025-02-06 06:38
gettext.sh
4.51
KB
-rwxr-xr-x
2025-02-06 06:38
gettextize
41.16
KB
-rwxr-xr-x
2025-02-06 06:38
giftogd2
8.55
KB
-rwxr-xr-x
2025-02-06 06:36
iconv
109.47
KB
-rwxr-xr-x
2025-02-06 06:30
icu-config
21.54
KB
-rwxr-xr-x
2025-02-06 06:39
icuinfo
13.41
KB
-rwxr-xr-x
2025-02-06 06:39
ifnames
4.09
KB
-rwxr-xr-x
2025-02-06 06:34
infocmp
58.45
KB
-rwxr-xr-x
2025-02-06 06:26
infotocap
63.09
KB
-rwxr-xr-x
2025-02-06 06:26
initdb
144.42
KB
-rwxr-xr-x
2025-02-06 06:34
jpegtran
40.02
KB
-rwxr-xr-x
2025-02-06 06:36
ldapadd
63.09
KB
-rwxr-xr-x
2025-02-06 06:31
ldapcompare
50.98
KB
-rwxr-xr-x
2025-02-06 06:31
ldapdelete
55.08
KB
-rwxr-xr-x
2025-02-06 06:31
ldapexop
51.05
KB
-rwxr-xr-x
2025-02-06 06:31
ldapmodify
63.09
KB
-rwxr-xr-x
2025-02-06 06:31
ldapmodrdn
50.98
KB
-rwxr-xr-x
2025-02-06 06:31
ldappasswd
51
KB
-rwxr-xr-x
2025-02-06 06:31
ldapsearch
75.27
KB
-rwxr-xr-x
2025-02-06 06:31
ldapurl
18.34
KB
-rwxr-xr-x
2025-02-06 06:31
ldapwhoami
51
KB
-rwxr-xr-x
2025-02-06 06:31
libmcrypt-config
1.43
KB
-rwxr-xr-x
2025-02-06 06:35
libpng-config
2.28
KB
-rwxr-xr-x
2025-02-06 06:36
libpng16-config
2.28
KB
-rwxr-xr-x
2025-02-06 06:36
libtool
311.71
KB
-rwxr-xr-x
2025-02-06 06:34
libtoolize
76.78
KB
-rwxr-xr-x
2025-02-06 06:34
makeconv
55.2
KB
-rwxr-xr-x
2025-02-06 06:39
mcrypt
110.88
KB
-rwxr-xr-x
2025-02-06 06:35
mdecrypt
110.88
KB
-rwxr-xr-x
2025-02-06 06:35
msgattrib
26.73
KB
-rwxr-xr-x
2025-02-06 06:38
msgcat
22.81
KB
-rwxr-xr-x
2025-02-06 06:38
msgcmp
28.08
KB
-rwxr-xr-x
2025-02-06 06:38
msgcomm
22.81
KB
-rwxr-xr-x
2025-02-06 06:38
msgconv
22.49
KB
-rwxr-xr-x
2025-02-06 06:38
msgen
22.48
KB
-rwxr-xr-x
2025-02-06 06:38
msgexec
18.76
KB
-rwxr-xr-x
2025-02-06 06:38
msgfilter
27.75
KB
-rwxr-xr-x
2025-02-06 06:38
msgfmt
91.06
KB
-rwxr-xr-x
2025-02-06 06:38
msggrep
45.78
KB
-rwxr-xr-x
2025-02-06 06:38
msginit
53.89
KB
-rwxr-xr-x
2025-02-06 06:38
msgmerge
69.13
KB
-rwxr-xr-x
2025-02-06 06:38
msgunfmt
37.13
KB
-rwxr-xr-x
2025-02-06 06:38
msguniq
22.69
KB
-rwxr-xr-x
2025-02-06 06:38
msql2mysql
1.42
KB
-rwxr-xr-x
2025-02-06 06:26
ncurses5-config
5.2
KB
-rwxr-xr-x
2025-02-06 06:26
ngettext
42.55
KB
-rwxr-xr-x
2025-02-06 06:38
nginxctl
2.23
KB
-rwxr-xr-x
2025-02-06 06:34
onig-config
1.35
KB
-rwxr-xr-x
2025-02-06 06:38
openssl
982.44
KB
-rwxr-xr-x
2025-02-06 06:22
osql
9.15
KB
-rwxr-xr-x
2025-02-06 06:36
pcre-config
2.31
KB
-rwxr-xr-x
2025-02-06 06:22
pcregrep
39.77
KB
-rwxr-xr-x
2025-02-06 06:22
pcretest
61.07
KB
-rwxr-xr-x
2025-02-06 06:22
pg_amcheck
108.21
KB
-rwxr-xr-x
2025-02-06 06:34
pg_archivecleanup
47.42
KB
-rwxr-xr-x
2025-02-06 06:34
pg_basebackup
137.06
KB
-rwxr-xr-x
2025-02-06 06:34
pg_checksums
65.57
KB
-rwxr-xr-x
2025-02-06 06:34
pg_config
45.95
KB
-rwxr-xr-x
2025-02-06 06:34
pg_controldata
60.06
KB
-rwxr-xr-x
2025-02-06 06:34
pg_ctl
75.31
KB
-rwxr-xr-x
2025-02-06 06:34
pg_dump
422.8
KB
-rwxr-xr-x
2025-02-06 06:34
pg_dumpall
116.8
KB
-rwxr-xr-x
2025-02-06 06:34
pg_isready
76.57
KB
-rwxr-xr-x
2025-02-06 06:34
pg_receivewal
96.09
KB
-rwxr-xr-x
2025-02-06 06:34
pg_recvlogical
96.7
KB
-rwxr-xr-x
2025-02-06 06:34
pg_resetwal
69.99
KB
-rwxr-xr-x
2025-02-06 06:34
pg_restore
192.84
KB
-rwxr-xr-x
2025-02-06 06:34
pg_rewind
143.98
KB
-rwxr-xr-x
2025-02-06 06:34
pg_test_fsync
48.14
KB
-rwxr-xr-x
2025-02-06 06:34
pg_test_timing
42.3
KB
-rwxr-xr-x
2025-02-06 06:34
pg_upgrade
158.7
KB
-rwxr-xr-x
2025-02-06 06:34
pg_verifybackup
116.61
KB
-rwxr-xr-x
2025-02-06 06:34
pg_waldump
106.13
KB
-rwxr-xr-x
2025-02-06 06:34
pgbench
193.26
KB
-rwxr-xr-x
2025-02-06 06:34
phar
14.54
KB
-rwxr-xr-x
2025-02-06 06:43
phar.phar
14.54
KB
-rwxr-xr-x
2025-02-06 06:43
php
19.99
MB
-rwxr-xr-x
2025-02-06 06:43
php-cgi
19.99
MB
-rwxr-xr-x
2025-02-06 06:43
php-config
5.14
KB
-rwxr-xr-x
2025-02-06 06:43
phpdbg
20.01
MB
-rwxr-xr-x
2025-02-06 06:43
phpize
4.43
KB
-rwxr-xr-x
2025-02-06 06:43
pkgdata
46.38
KB
-rwxr-xr-x
2025-02-06 06:39
pngtogd
8.5
KB
-rwxr-xr-x
2025-02-06 06:36
pngtogd2
8.55
KB
-rwxr-xr-x
2025-02-06 06:36
postgres
8.37
MB
-rwxr-xr-x
2025-02-06 06:34
postmaster
8.37
MB
-rwxr-xr-x
2025-02-06 06:34
psql
503.34
KB
-rwxr-xr-x
2025-02-06 06:34
rdjpgcom
13.26
KB
-rwxr-xr-x
2025-02-06 06:36
recode-sr-latin
18.13
KB
-rwxr-xr-x
2025-02-06 06:38
reindexdb
90.69
KB
-rwxr-xr-x
2025-02-06 06:34
reset
23.7
KB
-rwxr-xr-x
2025-02-06 06:26
sqlite3
158.09
KB
-rwxr-xr-x
2025-02-06 06:35
tabs
17.49
KB
-rwxr-xr-x
2025-02-06 06:26
tdspool
405.42
KB
-rwxr-xr-x
2025-02-06 06:36
testgdbm
39.06
KB
-rwxr-xr-x
2025-02-06 06:36
tic
63.09
KB
-rwxr-xr-x
2025-02-06 06:26
toe
18.34
KB
-rwxr-xr-x
2025-02-06 06:26
tput
18.3
KB
-rwxr-xr-x
2025-02-06 06:26
tset
23.7
KB
-rwxr-xr-x
2025-02-06 06:26
tsql
381.78
KB
-rwxr-xr-x
2025-02-06 06:36
uconv
55.16
KB
-rwxr-xr-x
2025-02-06 06:39
vacuumdb
90.91
KB
-rwxr-xr-x
2025-02-06 06:34
webpng
17.73
KB
-rwxr-xr-x
2025-02-06 06:36
wrjpgcom
17.48
KB
-rwxr-xr-x
2025-02-06 06:36
xgettext
289.85
KB
-rwxr-xr-x
2025-02-06 06:38
xml2-config
1.77
KB
-rwxr-xr-x
2025-02-06 06:30
xmlcatalog
41.27
KB
-rwxr-xr-x
2025-02-06 06:30
xmllint
203.16
KB
-rwxr-xr-x
2025-02-06 06:30
xmlwf
33.62
KB
-rwxr-xr-x
2025-02-06 06:44
xslt-config
2.41
KB
-rwxr-xr-x
2025-02-06 06:31
xsltproc
81.48
KB
-rwxr-xr-x
2025-02-06 06:31
zipcmp
23.72
KB
-rwxr-xr-x
2025-02-06 06:38
zipmerge
14.34
KB
-rwxr-xr-x
2025-02-06 06:38
ziptool
48.45
KB
-rwxr-xr-x
2025-02-06 06:38
Save
Rename
#! /bin/sh # $Id: osql,v 1.12 2011-05-11 03:08:13 jklowden Exp $ # # Check odbc.ini, odbcinst, and, optionally, freetds.conf, # then execute isql (assume it's unixODBC's isql). # USAGE="Syntax: $(basename $0) -S server -U user -P password" while getopts I:S:U:P: OPTION do case ${OPTION} in I) OVER_DIR=${OPTARG} # override ;; S) DSN=${OPTARG} ;; U) USERNAME=${OPTARG} ;; P) PASSWORD=${OPTARG} ;; \?) echo $USAGE exit 1 ;; esac done #cho ${DSN} ${USERNAME} ${PASSWORD} if [ -z "${DSN}" -o -z "${USERNAME}" -o -z "${PASSWORD}" ] then echo $USAGE exit 1 fi ISQL=$(command -v isql) if [ -z "${ISQL}" ] then echo "$(basename $0): error: no \"isql\" command found. Is unixODBC installed?" exit 1 fi # Establish ODBC prefix directory ISQL_DIR=$(strings ${ISQL} | grep ^/ | grep -v elf | grep -v '\.so\.' | head -1 | sed 's/lib$/etc/' ) INI_DIRNAME="/tmp/$(basename $0).$$" exec 3> ${INI_DIRNAME} # Check the libraries, too. if [ -z "${OVER_DIR}" ] then echo "checking shared odbc libraries linked to isql for default directories..." (echo ${ISQL_DIR}; ldd "${ISQL}" | awk '/libodbc\./ {print $3}') \ | while read L do strings "$L" | grep '^/' | grep -v '/lib' \ | while read D do if [ ! -s "${INI_DIRNAME}" ] then printf " trying $D ... " if [ -d "$D" -a -r "${D}/odbc.ini" ] then printf $D >&3 printf "OK" else printf "no" fi printf "\n" fi done done fi ODBC_DIR=$(cat ${INI_DIRNAME}) && rm ${INI_DIRNAME} if [ -z "${ODBC_DIR}" -a -z "${OVER_DIR}" ] then echo "$(basename $0): problem: no potential directory strings in \"$(command -v isql)\"" echo "$(basename $0): advice: use \"osql -I DIR\" where DIR unixODBC\'s install prefix e.g. /usr/local" echo "isql strings are:" strings ${ISQL} | grep ^/ | sed 's/^/+ /' #xit 1 fi if [ "${OVER_DIR}" ] then if [ -d "${ODBC_DIR}" ] then echo "\"${ODBC_DIR}\" is a directory, overridden by" else echo "\"${ODBC_DIR}\" is NOT a directory, overridden by" fi echo "\"${OVER_DIR}\"." if [ -d "${OVER_DIR}" ] then ODBC_DIR=${OVER_DIR} else echo "$(basename $0): error: \"${OVER_DIR}\" is not a directory" exit 1 fi fi # Look for server entry in odbc.ini echo 'checking odbc.ini files' for F in "${HOME}/.odbc.ini" "${ODBC_DIR}/odbc.ini" do if [ ! -d "$(dirname $F)" ] then echo "warning: $(dirname $F) is not a directory" continue fi if [ -r "$F" ] then echo " reading $F" else echo " cannot read \"$F\"" continue fi grep -F "[${DSN}]" $F > /dev/null if [ $? -eq 0 ] then echo "[${DSN}] found in $F" ODBC_INI=$F break else echo "[${DSN}] not found in $F" fi done if [ -z "${ODBC_INI}" ] then echo "$(basename $0): error: unable to locate ${DSN} in any odbc.ini" exit 1 fi # Report finding of server entry echo found this section: SED_CMD="/^\[${DSN}\]/,/^[[:space:]]*$/ { s/^/ /; p; }" sed -ne "${SED_CMD}" ${ODBC_INI} # # Examine server entry in odbc.ini # # Find the driver in the servername or default section for D in "${DSN}" 'default' do echo "looking for driver for DSN [$D] in ${ODBC_INI}" grep "$D" ${ODBC_INI} > /dev/null if [ $? -eq 0 ] then CMD="/^\[$D\]/,/^[[:space:]]*$/ { s/^/ /; p; }" DRIVER_LINE=$(sed -ne "${CMD}" ${ODBC_INI} \ | grep -Ei '^[[:space:]]*driver[[:space:]]*=') if [ -z "${DRIVER_LINE}" ] then echo " no driver mentioned for [$D] in $(basename ${ODBC_INI})" continue fi echo " found driver line: \"${DRIVER_LINE}\"" DRIVER=$(echo ${DRIVER_LINE} \ | awk -F ' *= *' '{print $2}' \ | sed 's/[[:space:]][[:space:]]*//g') if [ "${DRIVER}" ] then echo " driver \"${DRIVER}\" found for [$D] in $(basename ${ODBC_INI})" break else echo " driver line for [$D] incomplete in $(basename ${ODBC_INI})" continue fi fi done if [ -z "${DRIVER}" ] then echo "$(basename $0): error: no driver found for [${DSN}] in $(basename ${ODBC_INI})" exit 1 fi # get filename of driver echo found driver named \"${DRIVER}\" if [ -d "${DRIVER}" -o ! -x "${DRIVER}" ] then # not a filename, look it up DRIVERNAME=${DRIVER} ODBC_INST="${ODBC_DIR}/odbcinst.ini" echo "\"${DRIVERNAME}\" is not an executable file" echo "looking for entry named [${DRIVERNAME}] in ${ODBC_INST}" grep "${DRIVERNAME}" ${ODBC_INST} > /dev/null if [ $? -ne 0 ] then if [ $? -eq 1 ] then echo "$(basename $0): error: no driver entry [${DRIVERNAME}] in ${ODBC_INST}" fi exit 1; fi CMD="/^\[${DRIVERNAME}\]/,/^[[:space:]]*$/ { s/^/ /; p; }" DRIVER_LINE=$(sed -ne "${CMD}" ${ODBC_INST} \ | grep -Ei '^[[:space:]]*driver[[:space:]]*=') if [ -z "${DRIVER_LINE}" ] then echo "$(basename $0): no driver mentioned for [${DRIVERNAME}] in $(basename ${ODBC_INST})" exit 1 fi echo " found driver line: \"${DRIVER_LINE}\"" DRIVER=$(echo ${DRIVER_LINE} | awk -F ' *= *' '{print $2}') if [ -z "${DRIVER}" ] then echo "$(basename $0): driver line incomplete for [${DRIVERNAME}] in $(basename ${ODBC_INST})" exit 1 fi echo " found driver ${DRIVER} for [${DRIVERNAME}] in $(basename ${ODBC_INST})" fi if [ -z "${DRIVER}" ] then echo $(basename $0): 'error: sorry, failed sanity check: ${DRIVER} is null' exit 1 fi if [ -x "${DRIVER}" ] then echo "${DRIVER} is an executable file" else echo "${DRIVER} is not an executable file" echo "$(basename $0): error: no driver found for ${DSN}" exit 1 fi # find the server/servername SERVER_LINE=$(sed -ne "${SED_CMD}" ${ODBC_INI} \ | grep -Ei '^[[:space:]]*server(name)*[[:space:]]*=') ATTRIBUTE=$(echo ${SERVER_LINE} | awk -F' *= *' '{print $1}') if [ -z "${ATTRIBUTE}" ] then echo "$(basename $0): neither \"Server\" nor \"Servername\" found for [${DSN}] in $(basename ${ODBC_INI})" exit 1 fi echo ${SERVER_LINE} | grep -i servername >/dev/null # # Find the server's hostname # if [ $? -eq 0 ] # ODBC-Combined then TDS_SERVER=$(echo ${SERVER_LINE} | awk -F ' *= *' '{print $2}') echo 'Using ODBC-Combined strategy' echo "DSN [${DSN}] has servername \"${TDS_SERVER}\" (from ${ODBC_INI})" if [ -z "${TDS_SERVER}" ] then exit 1 fi # Look for $TDS_SERVER in freetds.conf FREETDS_DIR=$(tsql -C | grep 'freetds.conf directory' | awk -F: '{print $2}' | sed 's/^ *//') if [ -z "${FREETDS_DIR}" ] then echo "$(basename $0): error: unable to locate directory for freetds.conf using \"$(command -v tsql)\"" exit 1 fi for F in "${HOME}/.freetds.conf" "${FREETDS_DIR}/freetds.conf" do if [ -r "$F" ] then echo $F is a readable file else echo cannot read \"$F\" continue fi echo "looking for [${TDS_SERVER}] in $F" grep -F "[${TDS_SERVER}]" $F > /dev/null if [ $? -eq 0 ] then FREETDS_CONF=$F break else echo "[${TDS_SERVER}]" not found in $F fi done if [ -z "${FREETDS_CONF}" ] then echo "$(basename $0): error: unable to locate ${TDS_SERVER} in any freetds.conf" exit 1 fi # Examine server entry in freetds.conf echo found this section: SED_CMD="/^\[${TDS_SERVER}\]/,/^[[:space:]]*$/ { s/^/ /; p; }" sed -ne "${SED_CMD}" ${FREETDS_CONF} SERVER_LINE=$(sed -ne "${SED_CMD}" ${FREETDS_CONF} \ | grep -Ei '^[[:space:]]*host[[:space:]]*=') # No character class support in mawk, # cf. "Mawk does not support Posix character classes in expressions" # https://bugs.launchpad.net/ubuntu/+source/mawk/+bug/69724 HOST=$(echo ${SERVER_LINE} | awk -F' *= *' '{print $2}') if [ -z "${HOST}" ] then echo "$(basename $0): no \"host\" entry found for [${TDS_SERVER}] in $(basename ${FREETDS_CONF})" exit 1 fi else # odbc.ini contains a "server", a DNS host HOST=$(echo ${SERVER_LINE} | awk -F ' *= *' '{print $2}') echo "\"${ATTRIBUTE}\" found, not using freetds.conf" echo "${ATTRIBUTE} is \"${HOST}\"" if [ -z "${HOST}" ] then echo "$(basename $0): no value found for \"${ATTRIBUTE}\" entry in $(basename ${ODBC_INI})" exit 1 fi fi # If the "host" is an ip address, look up the name, for neatness, e.g. ## $ host 10.81.36.39 ## 39.36.81.10.IN-ADDR.ARPA domain name pointer ntc5003.eg.com if [ "${HOST}" = "$(echo ${HOST} | sed 's/[^.0-9]*//')" ] then ADDRESS=${HOST} echo 'looking up hostname for ip address' ${ADDRESS} HOST=$(host ${HOST} | awk '/domain/ {print $5}' | sed 's/\.$//') if [ -z "${HOST}" ] then echo "$(basename $0): warning: no DNS hostname found for \"${ADDRESS}\"" HOST=${ADDRESS} # restore host address string fi fi # Now we have a DNS hostname for the server in HOST if [ "${HOST}" != "${ADDRESS}" ] then ADDRESS=$(host ${HOST} | awk '/has address/ {print $4}' | head -1) fi if [ -z "${ADDRESS}" ] then echo "$(basename $0): no IP address found for \"${HOST}\"" exit 1 fi #cho ${HOST} has address ${ADDRESS} # Report what we know and exec isql printf "\n" printf "Configuration looks OK. Connection details:\n\n" printf "%22s:\t%-30s\n" DSN ${DSN} printf "%22s:\t%-30s\n" odbc.ini "${ODBC_INI}" printf "%22s:\t%-30s\n" Driver ${DRIVER} printf "%22s:\t%-30s\n" "Server hostname" ${HOST} printf "%22s:\t%-30s\n" Address ${ADDRESS} printf "\n" echo Attempting connection as ${USERNAME} ... if [ -z "${TDSDUMP}" ] then TDSDUMP_AUTO="/tmp/$(basename $0).dump.$$" export TDSDUMP=${TDSDUMP_AUTO} fi ( set -x; isql ${DSN} ${USERNAME} ${PASSWORD} -v ) \ || sed -ne 's/Connecting/FAILED &/p' ${TDSDUMP} test "${TDSDUMP_AUTO}" && rm -f ${TDSDUMP_AUTO}