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
How to giv two conditions in IF statement..?? RRVARMA Shell Programming and Scripting 6 04-25-2008 09:33 AM
reduce the or conditions hitmansilentass Shell Programming and Scripting 8 05-03-2007 05:27 PM
multiple conditions in if/then grandtheftander UNIX for Dummies Questions & Answers 4 07-21-2006 01:58 PM
if statement with two conditions cin2000 Shell Programming and Scripting 1 01-23-2006 03:21 PM
if statement with two conditions -e, && yongho Shell Programming and Scripting 16 06-14-2005 04:46 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-24-2008
kittusri9 kittusri9 is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 40
problem with if, while, for conditions

Hi All,

when iam running the script with if or while
it showing following erros

Please any one clarify this

my script is:
------------
cat fileList.txt | while read line
do
echo $line
done

output:
--------
searchGateway.sh: line 14: syntax error near unexpected token `done'
searchGateway.sh: line 14: `done'


if i use if conditions
it shows error like
searchGateway.sh: line 14: syntax error near unexpected token `fi`
searchGateway.sh: line 14: `fi'

Please help me
Thankyou guys
Krish
  #2 (permalink)  
Old 04-24-2008
Shivdatta Shivdatta is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 73
Does this help

Code:

while read line
do
echo $line
done < fileList.txt
  #3 (permalink)  
Old 04-24-2008
namishtiwari namishtiwari is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2007
Location: Bangalore
Posts: 377
Quote:
Originally Posted by kittusri9 View Post
Hi All,

when iam running the script with if or while
it showing following erros

Please any one clarify this

my script is:
------------
cat fileList.txt | while read line
do
echo $line
done

output:
--------
searchGateway.sh: line 14: syntax error near unexpected token `done'
searchGateway.sh: line 14: `done'


if i use if conditions
it shows error like
searchGateway.sh: line 14: syntax error near unexpected token `fi`
searchGateway.sh: line 14: `fi'

Please help me
Thankyou guys
Krish
Do not open a new thread for the same problem again and again that is not going to solve your problem anyway.The moderator will close your thread.
  #4 (permalink)  
Old 04-24-2008
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,119
Do not double post - pls read the Rules.
Thread closed!
Sponsored Links
Closed Thread

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:47 PM.


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