Bin/sh 1 Syntax Error Word Unexpected
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 Learn more about Stack Overflow the company Business Learn more bin sh c line 1 syntax error unexpected end of file about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users
Bin Sh C Line 0 Syntax Error Near Unexpected Token
Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping
Bin Sh 1 Syntax Error Unterminated Quoted String
each other. Join them; it only takes 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
Line 1 Syntax Error Word Unexpected Expecting
(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 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 syntax error word unexpected (expecting do ) 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's a long way down in the comments but it didn't take long to search for qmake: Syntax error: word unexpected. Quote: Tej says: January 4, 2013 at 12:20 pm Ok, I have solved the Problem. Its very unfortunate that ppl did not tell what actually is the problem. Problem is we have to use Host qmake. For that whatever Export (export PATH=/usr/local/arm/4.3.2/bin:$PATH etc.) we did in step during tslib installation, we have to undo all of that. Thats it. Hope that help someone In case that's not clear, Tej suggests that it w
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 syntax error word unexpected (expecting ) ) shell script Stack Overflow the company Business Learn more about hiring developers or posting ads with syntax error word unexpected (expecting ) ) ubuntu us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a syntax error word unexpected (expecting ) ) android community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Switch case: Confusing error in “Syntax error: word unexpected (expecting ”in“)” up vote 0 down http://stackoverflow.com/questions/36725864/syntax-error-word-unexpected-expecting vote favorite This is my code: echo echo "WELCOME" echo "-------------------------------------------------" while true do echo echo "Select A Menu Option" echo "1: Ancestry History" echo "2: Who is Online" echo "3: What Process Any User is Running" echo "4: Exit" read mOption case $mOption in 1) echo echo "The Ancestry Tree For Current Process is...."; ps -ef > processes grep "ps -ef" processes > grepProcesses awk '{print $2, $3}' processes http://stackoverflow.com/questions/28399928/switch-case-confusing-error-in-syntax-error-word-unexpected-expecting-in > awkProcesses PID=$(awk '{print $2}' grepProcesses) echo $PID SPID=$(awk '{print $3}' grepProcesses) PID=$SPID end=0 while [ $end != 1 ] do echo " | " echo $SPID PID=$SPID SPID=$(grep ^"$PID " awkProcesses | cut -d' ' -f2) if [ "$PID" = "1" ] then end=1 fi done rm processes rm grepProcesses rm awkProcesses ;; 2) echo echo "Users Currently Online"; who | cut -d' ' -f1 ;; 3) echo echo "Select a Currently Online User to View their Processes:" index=0 who | while read onlineUser do echo "$index-$onlineUser" who|cut -d' ' -f1>>userList index=$((index+1)) done awk '{ print $0 }' userList read choice if [ $choice ] then echo echo ***Process Currently Running*** person=$(grep ^$choice userList |cut -d'-' -f2) ps -ef >> process grep $person process else echo You have made a mistake. Please start over. fi rm userList rm process ;; 4) echo echo "Exiting..." exit 1;; *) echo echo "Invalid Input. Try Again." ;; esac done Each time I run it I just keep getting the syntax error "hmwk1.sh: 17: hmwk1.sh: Syntax error: word unexpected (expecting "in")" I looked up different syntax examples and it seems that my code looks correct. But my trial and error gets me nowhere to fixing my code. Could I be missing a parenthes
Search Tutorials/Articles Search HCL Search Reviews Search ISOs Go to Page... LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer [SOLVED] line 1: syntax error: word unexpected http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/line-1-syntax-error-word-unexpected-expecting-898733/ (expecting ")") User Name Remember Me? Password Linux - Embedded & Single-board computer This http://www.unix.com/shell-programming-and-scripting/103528-syntax-error-word-unexpected-expecting.html 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. You are currently viewing LQ as a guest. By joining our community syntax error 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 to LinuxQuestions.org? Visit the following links: Site Howto | Site FAQ | Sitemap | Register Now If you syntax error word 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: 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 x8
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... 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 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 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 201