The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


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

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
get values from isql query DebianJ Shell Programming and Scripting 3 06-27-2008 03:52 AM
C Shell Script query bpupdown Shell Programming and Scripting 1 05-13-2008 04:38 PM
A simple query on unix shell script shekhar_ssm Shell Programming and Scripting 2 01-23-2008 08:41 AM
sql query results in unix shell script skyineyes UNIX for Dummies Questions & Answers 1 06-20-2007 07:56 AM
isql in shell script help mrviking Shell Programming and Scripting 2 06-09-2006 02:11 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 11-13-2007
Registered User
 

Join Date: Nov 2007
Posts: 22
isql query in unix shell script

Dear all

I want to execute some isql command from unix shell script. Kindly suggest me. isql command mention below.

isql -U -P
use gdb_1
go
select count (*) from table_x
go
Reply With Quote
Forum Sponsor
  #2  
Old 11-13-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Do you mean

Code:
#!/bin/sh

isql -U -P <<EOF
use gdb_1
go
select count (\*) from table_x
go
EOF
Reply With Quote
  #3  
Old 11-13-2007
Registered User
 

Join Date: Nov 2007
Posts: 22
Quote:
Originally Posted by porter View Post
Do you mean

Code:
#!/bin/sh

isql -U -P <<EOF
use gdb_1
go
select count (\*) from table_x
go
EOF
what does mean by <<EOF and EOF at last statement.
Reply With Quote
  #4  
Old 11-14-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
It means use everything between these two tags as stdin.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 07:31 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0