LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 10-30-2005, 10:34 AM   #1
Dave Kelly
Member
 
Registered: Aug 2004
Location: Todd Mission Texas
Distribution: Linspire
Posts: 215

Rep: Reputation: 31
Syntex error in script


Code:
main()
{
	gettldp()
	while :
	do
	getmirror()
	showresults()
	done
}
Code:
SilverNail:~/documents/code/mirrow# ./updatemirror2
./updatemirror2: line 12: syntax error near unexpected token `showresults'
./updatemirror2: line 12: `     showresults()'
SilverNail:~/documents/code/mirrow#
What does one look for when they get errors such as this. I inserted another function call between getmirror and showresults and still get line 12 but the token is now checkdiff.

Could this be a memory glitch in the area that stores varable that is showing up here.

If I use a hex editor to look at the file, there is nothing that shows that doesn't with text editor.

Is there a tutoral on debugging? Is there a system wide error number available and a list of their meaning?
 
Old 10-31-2005, 03:02 AM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
You don't call a shell function with parenthesis

func()
{
do stuff
}

calls as:
func

NOT

func()
 
  


Reply



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
Please check this script for error AxXium Linux From Scratch 5 07-18-2005 03:40 PM
bash script error near 'else' ? nutthick Linux - Newbie 5 01-23-2005 03:41 PM
error in alsaconf script rgiggs Slackware 2 07-21-2004 11:42 AM
simple script but error ryedunn Programming 4 03-11-2004 07:02 AM
linux 9 and java script error - premature end of script header sibil Linux - Newbie 0 01-06-2004 04:21 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:15 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration