Home > Syntax Error > Bash Array Syntax Error Word Unexpected Expecting

Bash Array Syntax Error Word Unexpected Expecting


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 I will edit it –user1357576 Jun 14 '12 at 3:57 1 @user1357576: Post the solution as an answer and mark it accepted, don't edit it into the question. RESOLVED: I was executing it as sh test.sh but I forgot I had to execute it as bash test.sh arrays bash shell syntax share|improve this question edited Jun 14 '12 at The PATH environment variable tells the shell which directories to search for commands. http://onlinetvsoftware.net/syntax-error/bash-array-syntax-error-unexpected-expecting.php

Is 8:00 AM an unreasonable time to meet with my graduate students and post-doc? See if your system has dos2unix then use it like dos2unix myScript.sh Also, as several people have commented on it, please edit your original question to eliminate the spaces around your but it yields the same error message. You are limited by virtual memory on your machine.

Line 1 Syntax Error Word Unexpected Expecting

on the first line is for - the OS will run the remainder of the line as a command and pass the contents of the file for it to interpret). Grab a bash binary of the same version from somewhere and manually install it. GTIN validation Now I know my ABCs, won't you come and golf with me? I do know that /bin/bash is a symbolic link to /bin/dash at the moment.

  1. That means that changing the shebang line should be sufficient to fix a script suffering from this class of bug.
  2. msseverAugust 2nd, 2008, 05:59 AMOn my system, I removed the /bin/sh link to dash, and changed it to point to /bin/bash.
  3. I sent the script to by brother........
  4. Remove advertisements Sponsored Links figaro View Public Profile Find all posts by figaro #5 03-05-2009 jim mcnamara [email protected]
  5. Yes, syntactically, you are correct.
  6. Dennis numbers 2.0 Can a creature benefit from differently typed speed bonuses all named fast movement?
  7. msseverAugust 2nd, 2008, 09:01 PMThanks for the suggestions.
  8. more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed
  9. I just wish Ubuntu would join in with the industry standard way of doing things.

This server was installed with Ubuntu 7.10 server 64-bit. How to extrude a face parallel to another? On THE other hand or on another hand? Syntax Error ( Unexpected Bash Array How could banks with multiple branches work in a world without quick communication?

This site is not affiliated with Linus Torvalds or The Open Group in any way. Mark Powered by vBulletin Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. Is it possible to check for existence of member template just by identifier? Is the empty set homeomorphic to itself?

On my local machine, and on the server, I run sh run_all_verification.sh... –Adam_G Mar 26 '15 at 19:56 2 Just never run a bash script with sh. Ksh Syntax Error Unexpected Is 8:00 AM an unreasonable time to meet with my graduate students and post-doc? Why? –muru May 4 '15 at 19:21 @muru, because bash is not sh, so it's misleading. I accepted a counter offer and regret it: can I go back and contact the previous company?

Syntax Error Word Unexpected (expecting Do )

The path /bin/sh is correct. Reply phuong March 14, 2013 @ 8:54 AM OMG…..thanks very much ^_^ Reply Pingback: pc.casey.jp » 意外な理由(?)で「Shell script arrays Syntax error: “(” unexpected」 jay September 9, 2013 @ 3:32 AM thank Line 1 Syntax Error Word Unexpected Expecting Due to Ubuntu's DashAsBinSh affinity I suspect your script is interpreted by dash instead of bash. Syntax Error Word Unexpected (expecting ) ) Shell Script Please explain the local library system in London, England Will the medium be able to last 100 years?

EDIT: Because bash is a superset of sh, any sh script (including bash scripts that masquerade as sh) should still run when executed by bash. check over here Yes, of course I'm an adult! bash shell ubuntu shell-script share|improve this question edited Aug 18 '12 at 12:08 Gilles 369k666681119 asked Aug 18 '12 at 11:37 kemra102 4681613 The shebang is really in line Almost all UNIX-like systems have bash, so it's possible to have your cake and eat it, too. Syntax Error Unexpected In Shell Script

cfajohnson View Public Profile Visit cfajohnson's homepage! Rui PaisJune 13th, 2008, 10:12 PMWhat if my first line says: #!/bin/bash? I still get this error, pointing to the line that begins arrIN=... 8: run_all_verification.sh: Syntax error: "(" unexpected (expecting "done") The shell script: #!/usr/bin/bash #base name for all experiments BASE_EXP_ID=$1; for his comment is here It is likely that your new dedicated server is running older version of Bash than your last server.

In terms of good practice you are not. Syntax Error ( Unexpected Ubuntu Thanks mssever. Should indoor ripened tomatoes be used for sauce?

Add the output of file /home/pi/sh/test.sh.

Run from a command line: dpkg -S /bin/bash to see what package create the link (i doubt that the link it's part of any package anyway... It can even fail on OS X where sh is bash, due to compatibility settings. –that other guy Mar 26 '15 at 19:57 When I run ./run_all..sh I get share|improve this answer answered May 4 '15 at 18:54 geirha 21.3k84653 "don't put .sh extension on a bash script"? Bash Function Syntax Error Unexpected share|improve this answer answered Aug 18 '12 at 12:08 Gilles 369k666681119 1 Thanks clearly a gap in my knowledge, I don't script much so wasn't aware of that!

if you put #!/bin/bash it will run with bash, if you put #!/bin/sh it will run with dash, unless you changed /bin/sh link from dash to bash (or other) reality1011June 15th, bash freebsd share|improve this question asked Oct 20 '12 at 16:53 Scott 1,15872535 add a comment| 4 Answers 4 active oldest votes up vote 2 down vote Bourne shell (sh) doesn't it's suppose to be much lighter and faster then bash, being that the reason why they choose it by Edgy days. http://onlinetvsoftware.net/syntax-error/bin-sh-1-syntax-error-word-unexpected-expecting.php Remember that sh run_verification.sh has the same bash vs sh issue that you originally saw, and that it will look for run_verification.sh in the current working directory and not necessarily the

Adopt A Jet/Book How to increase the population growth of the human race How could banks with multiple branches work in a world without quick communication? Any ideas? Page 1 of 3 123 Last Jump to page: Results 1 to 10 of 23 Thread: BASH problem Word unexpected (expecting ")") Thread Tools Show Printable Version Subscribe to this Thread… I can't find the actual bash shell anywhere.

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=$(