Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.


  Search this Thread
Old 08-22-2011, 05:52 AM   #1
LQ Newbie
Registered: Jun 2011
Posts: 16

Rep: Reputation: Disabled
line 1: syntax error: word unexpected (expecting ")")

Hi,I was working with beagle board and showed line 1: syntax error: word unexpected (expecting ")") error but the same program worked with x86 platform , the only change I made was cross compiled it for arm cortex a8

Last edited by me011089; 08-22-2011 at 05:53 AM.
Old 08-22-2011, 06:37 PM   #2
Senior Member
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
I'm not a coder by profession but if you want help from anyone here you'll probably need to provide more info - maybe even the code that you're trying to run.
Old 08-23-2011, 04:25 AM   #3
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 166

Rep: Reputation: 29
I suppose you are running a script. It's possible it was not written for the shell in your beagleboard. You can cross-compile the same shell for beagleboard (as the one used in your x86 platform) and it should run fine.
Old 08-23-2011, 04:35 AM   #4
LQ Newbie
Registered: Jun 2011
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thanks for your suggestion,
I cross compiled my code using arm-2009q3 tool chain then I transferred it to beagle board through SD card then also it is showing that error line 1: syntax error: word unexpected (expecting ")")
Old 08-23-2011, 08:03 AM   #5
Registered: Aug 2009
Location: Ilkeston, England
Distribution: ubuntu, xp, embeded
Posts: 79

Rep: Reputation: 1
As cnxsoft suggested it seems as though you're not running the compiled program but a script instead (because the error is a scripting error not a C/CPP run time error)... It may be that the script has the same name as the program and is higher up the directory tree. To make sure you run the compiled program I believe that being in the directory of the program and typing ./programname forces the program "in the current directory" to be run.
Old 08-23-2011, 08:34 AM   #6
LQ Newbie
Registered: Jun 2011
Posts: 16

Original Poster
Rep: Reputation: Disabled


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
Busybox Syntax error: word unexpected (expecting ")") asprakash Linux - Embedded & Single-board computer 6 10-13-2010 02:22 AM
[SOLVED] Shell Scripting "syntax error : unexpected end of file" roxie600 Programming 12 04-30-2010 12:18 AM
Backup Script error "line 31: syntax error: unexpected end of file" eswanepoel General 7 12-07-2007 09:28 AM

All times are GMT -5. The time now is 10:29 PM.

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