Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
google site



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-12-2009
Registered User
 

Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Passing Shell Variables in ISQL

Hi..

I am passing a variable in my shell function. I need to access it for an isql comand in the shell script.

However the isql o/p gives no results if i pass a variable in the command. The isql command works perfectly fine if i hardcore the table name.

My script is :

log=/home/../log/txt

LengthCheck()
{
tablename=$1

isql -S<server> -U<user> -P<pass> -D <db> -o $log << EOF
SELECT length,type from syscolumns
WHERE id = object_id("$tablename")
EOF

..
..
..
}

LengthCheck Employee

plz help..

Thanks,
dikki
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need help passing variables in shell script to perl one-liner Xek Shell Programming and Scripting 1 01-15-2008 02:12 PM
passing two variables into a shell script? Bashar Shell Programming and Scripting 2 05-15-2007 10:00 AM
isql in shell script help mrviking Shell Programming and Scripting 2 06-09-2006 05:11 AM
Passing variables to sql from batch shell in linux rama71 Linux 2 06-28-2005 03:38 PM
Passing shell variables to awk program.. Vishnu Shell Programming and Scripting 1 07-17-2004 10:04 AM



All times are GMT -4. The time now is 02:31 AM.