1 Syntax Error & Unexpected Expecting
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings syntax error word unexpected (expecting ) ) makefile and policies of this site About Us Learn more about Stack Overflow syntax error word unexpected (expecting ) ) shell script the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation line 1: syntax error: unexpected word (expecting ")") Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it syntax error word unexpected (expecting ) ) ubuntu only takes a minute: Sign up Syntax error: end of file unexpected (expecting “then”) up vote 1 down vote favorite 2 I am making this code for a minecraft server plugin updater I am a new shell scripter so I don't know alot... when I run this code I get a error: #!/bin/sh export PATH=$PATH:. #Options PLUGINDOWNLOADLINK=http://api.bukget.org/3/plugins/bukkit/$PLUGINNAME/latest/download # Plugin folder if
Syntax Error: "(" Unexpected Bash
[ -f $PWD\plugins ]; then PLUG=$PWD\plugins else PLUG=$PWD\plug-ins fi cd $PLUG if [ ! -f .\update ]; then mkdir update echo Making Directory "update".. fi # Plugins Found for i in $( ls ); do PLUGINNAME=$i done cd .\update wget $PLUGINDOWNLOADLINK # No Plugins Found if [ ! -f $PLUG ]; then echo echo echo No plugin found. echo echo echo echo Plugins can be downloaded here: echo http://dev.bukkit.org/bukkit-plugins fi # stop sleep 3s exit I get this error: Syntax error: end of file unexpected (expecting "then") so I put "then" in the place it wanted me to and ran it again: it gave me this error now: Syntax error: end of file unexpected I wrote it on windows 7 notepad++ how can I fix this? linux shell unix minecraft share|improve this question edited Aug 9 '13 at 21:43 asked Aug 9 '13 at 21:22 user2649805 13115 The code you posted does not cause the error. –choroba Aug 9 '13 at 21:26 then what does? –user2649805 Aug 9 '13 at 21:27 or h
Search Tutorials/Articles Search HCL Search Reviews Search ISOs Go to Page... LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded &
Python Syntax Error: Word Unexpected (expecting ")")
Single-board computer [SOLVED] line 1: syntax error: word unexpected (expecting ")") User syntax error word unexpected (expecting ) ) android Name Remember Me? Password Linux - Embedded & Single-board computer This forum is for the discussion of Linux on emulator syntax error word unexpected expecting 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. Notices Welcome to LinuxQuestions.org, http://stackoverflow.com/questions/18155852/syntax-error-end-of-file-unexpected-expecting-then a friendly and active Linux Community. You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today! Note that registered members see fewer ads, and ContentLink http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/line-1-syntax-error-word-unexpected-expecting-898733/ is completely disabled once you log in. Are you new to LinuxQuestions.org? Visit the following links: Site Howto | Site FAQ | Sitemap | Register Now If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here. Having a problem logging in? Please visit this page to clear all LQ-related cookies. Introduction to Linux - A Hands on Guide This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter. For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own. Click Here to rec
Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here. Search Forums Show Threads Show Posts Tag Search Advanced Search Unanswered Threads Find All Thanked Posts Go to Page... http://www.unix.com/shell-programming-and-scripting/103528-syntax-error-word-unexpected-expecting.html linux operating commands and unix operating commands Syntax error: word unexpected (expecting ")") Shell Programming and Scripting Page 1 of 2 1 2 > Thread Tools Search this Thread Display Modes #1 03-05-2009 figaro Registered User Join Date: Jan 2007 Last Activity: 27 August 2016, 2:57 PM EDT Posts: 842 Thanks: 93 Thanked 29 Times in 25 Posts Syntax error: word unexpected (expecting ")") I have a very simple script syntax error that reads in the contents of a file (_open.txt) into an array "lyrics": Code: #!/bin/sh # read in the text lyrics=( `cat _open.txt` | tr '\n' ' ') exit 0 It gives the following error message: ./lyrics.sh: 1: Syntax error: word unexpected (expecting ")") I have also tried Code: lyrics=($(cat _open.txt)) as well as with and without quotes (single and double) around the filename. but it yields the same error message. The path /bin/sh is correct. What is the syntax error word error message really saying? Remove advertisements Sponsored Links figaro View Public Profile Find all posts by figaro #2 03-05-2009 jim mcnamara ...@... Join Date: Feb 2004 Last Activity: 2 October 2016, 11:09 AM EDT Location: NM Posts: 10,825 Thanks: 446 Thanked 968 Times in 899 Posts try this Code: #bash: declare -a lyrics=$( < _open.txt ) #ksh set -A lyrics=$( < _open.txt ) If you are using bash or ksh this will work. ksh limits the number of elements in an array to 1023. So _open.txt has to have less than 1024 "words" in it. Remove advertisements Sponsored Links jim mcnamara View Public Profile Find all posts by jim mcnamara #3 03-05-2009 cfajohnson Shell programmer, author Join Date: Mar 2007 Last Activity: 11 July 2016, 2:55 PM EDT Location: Toronto, Canada Posts: 2,898 Thanks: 0 Thanked 134 Times in 118 Posts What shell is in /bin/sh? Most shells do not have arrays, so you may have to change the shebang to one that does, perhaps "#!/bin/bash". cfajohnson View Public Profile Visit cfajohnson's homepage! Find all posts by cfajohnson #4 03-05-2009 figaro Registered User Join Date: Jan 2007 Last Activity: 27 August 2016, 2:57 PM EDT Posts: 842 Thanks: 93 Thanked 29 Times in 25 Posts Thank you for your prompt response. What is the cause of the synt