Line 1 Syntax Error Unexpected Word
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and syntax error word unexpected (expecting ) ) shell script policies of this site About Us Learn more about Stack Overflow the syntax error word unexpected (expecting ) ) makefile company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users syntax error word unexpected (expecting ) ) ubuntu Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes
Emulator Syntax Error Word Unexpected Expecting
a minute: Sign up Syntax error: word unexpected (expecting “)”) up vote 1 down vote favorite Problem in short- In linux whenever we get the following error "Syntax error: word unexpected (expecting ")")", what does it generally mean? Problem in details- I have been trying to cross-compile Qt-4.6 as per Sourcery tool chain on Ubuntu 10.04. I followed the exact steps syntax error word unexpected (expecting ) ) android mentioned at the link compiling Qt-4.6. But I get the following error right in the ./configure step - /home/weds/qt-everywhere-opensource-src-4.6.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")") Searching in internet I found lots of posts regarding this error. Read all of them. But still clueless as to What this error is and How to solve it. I would be glad if someone would help me in understanding this error. P.S 1- Sourcery toolchain is present inside /opt/ folder and my PATH variable is correctly pointing to it. P.S 2- This toolchain was not installed manually by me. Rather it was provided by a vendor as a .tgz file which I extracted inside /opt/ folder. arm qt4 share|improve this question asked Apr 19 at 13:53 satya prakash Panigrahi 813 migrated from unix.stackexchange.com Apr 19 at 17:50 This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems. add a comment| 3 Answers 3 active oldest votes up vote 1 down vote accepted An answer to this seems to be posted in the instructions to which you linked. Admittedly it'
by CloudFlare Ray ID: 2f4a27ef213036fc
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about http://unix.stackexchange.com/questions/45781/shell-script-fails-syntax-error-unexpected hiring developers or posting ads with us Unix & Linux Questions Tags Users Badges Unanswered https://forum.synology.com/enu/viewtopic.php?t=61353 Ask Question _ Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Shell script fails: Syntax error: “(” unexpected up syntax error vote 31 down vote favorite 7 I've been working on a script that automates setting up a development environment for Raspberry Pi development (step by step details that work are here). The script is linked in that article but convenience you can find it here also. Now when run this script install and sets up the environment without error but you have to enter your sudo password more than once due to sudo's time-out value by default. So I started word unexpected (expecting experimenting by removing all the sudo lines and running the whole script via sudo at the command line like so: kemra102@ubuntuvm:~$ sudo ./pi_dev_env_install.sh This works fine as expected and gets most of the way through until this point: ./pi_dev_env_install: 68: ./pi_dev_env_install.sh: Syntax error: "(" unexpected Now this line worked fine previously when not running the whole script with sudo. There is nothing about this line running as sudo that should stop it working to my knowledge, does anyone have any ideas? bash shell ubuntu shell-script share|improve this question edited Aug 18 '12 at 12:08 Gilles 372k696761127 asked Aug 18 '12 at 11:37 kemra102 4731613 The shebang is really in line 9? Due to Ubuntu's DashAsBinSh affinity I suspect your script is interpreted by dash instead of bash. Try to move the shebang in line 1. –manatwork Aug 18 '12 at 11:45 According to that article calling /bin/bash directly instead of /bin/sh will; correctly use bash instead of dash so that should not be an issue as I understand it. I can still move the shebang of course, but that doesn't really explain as to why it works when you don’t sudo the whole script. –kemra102 Aug 18 '12 at 11:50 add a comment| 5 Answers 5 active oldest votes up vote 47 down vote accepted The script does not begin with a shebang line, so the kernel executes it with /bin/sh. On Ubuntu,
Synology DiskStation The Underground (Modders here!) Command Line Interface Search It is currently Thu Oct 20, 2016 6:45 am All times are UTC+01:00 All commands gives: syntax error - unexpected word Any questions about the Command Line Interface can be placed here! Forum rules Please note the disclaimer before modifying your Synology Product. Post Reply Print view Search Advanced search 3 posts • Page 1 of 1 magnused Trainee Posts: 16 Joined: Sun Jan 09, 2011 2:18 pm Location: Gothenburg, Sweden All commands gives: syntax error - unexpected word Quote Postby magnused » Wed Dec 19, 2012 9:32 pm Hi all.A while ago I migrated from DS210j to DS213+. I ran into some problems, but after some help from Synology support I got things up and running. I thought. Now when I try to use command line tools I get errors on almost everything. I have tried the following commands both as "root" and "admin":Code: Select allDiskStation> diff
/opt/bin/diff: line 1: syntax error: unexpected word (expecting ")")
DiskStation> curl
/opt/bin/curl: line 1: syntax error: unexpected word (expecting ")")
DiskStation> ipkg
/opt/bin/ipkg: line 1: syntax error: unexpected word (expecting ")")
DiskStation> wget
/opt/bin/wget: line 1: syntax error: unexpected word (expecting ")")
DiskStation>
I am suspecting this could be that I have migrated from one cpu architecture to another (arm to ppc), but not sure.Anyone got any idea why no of these utils work?Regards,Magnus Top maxxfi Compiler Posts: 6794 Joined: Sun Dec 27, 2009 12:13 pm Location: Espoo, Finland Re: All commands gives: syntax error - unexpected word Quote Postby maxxfi » Sun Dec 23, 2012 5:42 pm I agree, it's probably because the CPU architecture is different.Unfortunately, not only you would need to reinstall ipkg from scrach, but actually as DS213+ uses 'qoriq' arch (a variant of ppc), I don't think there is even a valid bootstrap available for the regular ipkg. DS-106j > DS-210j > DS-411 Top magnused Trainee Posts: 1