Bin/sh 1 Syntax Error Word 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 and policies of this site About Us bin sh c line 1 syntax error unexpected end of file Learn more about Stack Overflow the company Business Learn more about hiring developers or
Syntax Error Word Unexpected (expecting Do )
posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow
Syntax Error Word Unexpected (expecting ) ) Shell Script
Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Syntax error: word unexpected (expecting “)”)? up vote
Line 1 Syntax Error Word Unexpected Expecting
5 down vote favorite 2 PLATFORM = x86 CUD = cuda X86 = x86 PAN = panda ARM = arm app: ifeq($(PLATFORM),$(CUD)) CC = dum3 endif ifeq($(PLATFORM), $(X86)) CC = gcc endif ifeq($(PLATFORM),$(PAN)) CC = dum1 endif ifeq($(PLATFORM),$(ARM)) CC = dum2 endif $(CC) -o ./Executable/list ./Source/ll_main.c ./Library/liblst.a ./Executable/list When I make this it shows error.... Syntax error: word unexpected (expecting ")") ? Plzz.. Help.. makefile share|improve this question syntax error word unexpected (expecting ) ) android asked Jan 20 '14 at 5:36 Chirag Parekh 11115 add a comment| 1 Answer 1 active oldest votes up vote 13 down vote accepted The formatting in your question (both the makefile and the error message) is too messed up to be sure, but my suspicion is that your ifeq is indented with a TAB. That's not right; ifeq is a make command. (Almost) all lines with TAB characters as the first character on the line in a makefile is passed to the shell. The shell doesn't know anything about ifeq, so, depending on your shell, might print an error like that. You should move the app: target after the ifeq blocks to just before the use of $(CC) (and ensure the $(CC) ... line is indented with a TAB as the first character on that line). In the future please be sure to use SO's formatting capabilities, and be sure to cut and paste error messages exactly, plus a few lines of context before and after, when asking questions. share|improve this answer answered Jan 20 '14 at 5:43 MadScientist 26.7k32238 1 Thanks MadScientist it really helped........... –Chirag Parekh Jan 20 '14 at 11:51 I just encou
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 python syntax error: word unexpected (expecting All Thanked Posts Go to Page... learn unix and linux commands Syntax error: ubuntu syntax error: word unexpected (expecting word unexpected (expecting ")") Shell Programming and Scripting Page 1 of 2 1 2 > Thread emulator syntax error word unexpected expecting 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 http://stackoverflow.com/questions/21226905/syntax-error-word-unexpected-expecting Posts Syntax error: word unexpected (expecting ")") I have a very simple script 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 http://www.unix.com/shell-programming-and-scripting/103528-syntax-error-word-unexpected-expecting.html and double) around the filename. but it yields the same error message. The path /bin/sh is correct. What is the 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: 1 October 2016, 1:25 PM 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 cfa
Wiki Search Tutorials/Articles Search HCL Search Reviews Search ISOs Go to Page... LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/line-1-syntax-error-word-unexpected-expecting-898733/ computer [SOLVED] line 1: syntax error: word unexpected (expecting ")") User Name Remember Me? Password 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. Notices Welcome to LinuxQuestions.org, a friendly and active Linux Community. syntax error 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 is completely disabled once you log in. Are you new syntax error word 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 receive this Complete Guide absolutely free. Search this Thread 08-22-2011, 05:52 AM #1 me011089 LQ Newbie Registered: Jun 2011 Posts: 16 Rep: