The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
awk Shell Script error : "Syntax Error : `Split' unexpected Herry UNIX for Dummies Questions & Answers 2 03-17-2008 11:16 AM
syntax error, need to redo one line in script :( mr_manny Shell Programming and Scripting 4 01-10-2008 01:20 PM
Syntax error in script KindHead Shell Programming and Scripting 2 12-12-2006 10:28 PM
syntax error in script !! uuser Shell Programming and Scripting 13 02-15-2006 02:58 PM
problem with script and syntax error message ReV Shell Programming and Scripting 5 01-20-2006 06:50 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 12-05-2005
rajus19 rajus19 is offline
Registered User
  
 

Join Date: Feb 2005
Location: Bangalore
Posts: 36
Syntax error in a script...

Hi All,

I have been fighting with a syntax error for the last 2 days, still haven't got the solution. Could you please help me, your help will be greatly appreciated.

In my script I am getting a error in a for loop, its similar to the one as is below.

for v_id in v1 v2 v3 v4
do
v_flag=`sqlplus -s orauser/passwd@oracle_sid << oratest
set feedback off
set heading off
select 'Y' from mytable where myid = $v_id;
exit 5
oratest`
if [ $v_flag ]
then
update the o/p file
fi
done

If the condition fails in the query the v_flag is null, then its giving the error "for not matched"

Can't I use the if condition which will be null inside the for loop?


Thanks in Advance
Raju
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On




All times are GMT -4. The time now is 10:58 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0