LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-01-2009, 10:24 AM   #1
ArthurHuang
Member
 
Registered: Jan 2006
Posts: 174

Rep: Reputation: 30
Bash script -----------syntax error: unexpected end of file


#!bin/bash
for i in $(seq 10 0.01 100 )
do
for j in $(seq 0 0.01 100)
do
./test 10 50 $i $j 2 2 5

done

exit 0



Can anyone see any reasons causing "syntax error: unexpected end of file" in this pathetic short script?

THANK YOU
 
Old 05-01-2009, 10:27 AM   #2
jan61
Member
 
Registered: Jun 2008
Posts: 235

Rep: Reputation: 46
Moin,

Quote:
Originally Posted by ArthurHuang View Post
#!bin/bash
for i in $(seq 10 0.01 100 )
do
for j in $(seq 0 0.01 100)
do
./test 10 50 $i $j 2 2 5

done

exit 0
You start two for loops, but end only one. There's the inner "done" missing.

Jan
 
Old 05-01-2009, 10:29 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
each "for" needs a "done" (loop inside a loop)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sntax error : unexpected end of file while executing shell script priyankarathi Linux - Newbie 5 04-21-2009 01:33 AM
Bash script - syntax error: unexpected end of file Mr Pink Programming 7 12-19-2008 06:31 AM
Backup Script error "line 31: syntax error: unexpected end of file" eswanepoel General 7 12-07-2007 09:28 AM
bash "unexpected end of file" script error Runge_Kutta Linux - General 6 05-23-2007 03:36 PM
/usr/bin/lesspipe: line 223: syntax error: unexpected end of file fakie_flip Linux - Software 1 09-06-2006 02:22 AM


All times are GMT -5. The time now is 05:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration