LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Syntex error in script (https://www.linuxquestions.org/questions/programming-9/syntex-error-in-script-378328/)

Dave Kelly 10-30-2005 10:34 AM

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?

bigearsbilly 10-31-2005 03:02 AM

You don't call a shell function with parenthesis

func()
{
do stuff
}

calls as:
func

NOT

func()


All times are GMT -5. The time now is 03:14 AM.