Home > Syntax Error > Syntax Error ( Unexpected In Shell Script

Syntax Error ( Unexpected In Shell Script

Contents

Here are the results: dpkg -S /bin/bash bash: /bin/bash Since bash is acually a link to dash, I'm not sure what this is telling me. what '#!' line (if any) starts your script? ARG1 / ARG2 arithmetic quotient of ARG1 divided by ARG2. Please click the link in the confirmation email to activate your subscription. http://fullflash.net/syntax-error/syntax-error-unexpected-end-of-file-shell-script.html

Sometimes some hidden characters are there in the source. Where it would be useful is when pasting the output of more than one command like in: paste <(cmd1) <(cmd) On systems that support /dev/fd/n, that can be done in sh How can I make two cutting lines close to each other? An IDE is no substitute for an Intelligent Developer.

Syntax Error ( Unexpected In Shell Script

Then ensure that the it is indeed installed, and if not, install it. bash shell ubuntu shell-script share|improve this question edited Aug 18 '12 at 12:08 Gilles 374k706831129 asked Aug 18 '12 at 11:37 kemra102 4731613 The shebang is really in line What does this ice key do? That means that changing the shebang line should be sufficient to fix a script suffering from this class of bug.

I can't find the actual bash shell anywhere. rarity? match STRING REGEXP same as STRING : REGEXP. Ksh Syntax Error Unexpected Lengthwise or widthwise.

this will then let you know if it is safe to read using cat/more etc... Syntax Error ( Unexpected Bash Array Browse other questions tagged shell centos ubuntu-12.04 or ask your own question. But, I did use aptitude, and tried to install bash. Why does Deep Space Nine spin?

jaya kemmannu Ranch Hand Posts: 92 posted 4 years ago Hi Tim, MY problem got resolved by using below for loop sytanx for i in 1 2 3 do // do Line 1: Syntax Error: Unexpected Word (expecting ")") Watching order for the Dan Brown films? Is the shell script installed as "executable" (i.e. maybe dash create it by default if bash it's not installed) You can rm the symlink and install bash: sudo rm /bin/bash sudo apt-get install bash hth Thanks for the suggestions.

  1. more hot questions question feed lang-sh about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation
  2. Almost all UNIX-like systems have bash, so it's possible to have your cake and eat it, too.
  3. But interestingly, on the correct arch the file beginning with #! /bin/sh executed perfectly.
  4. In Centos system, /bin/sh is symlink to /bin/bash.

Syntax Error ( Unexpected Bash Array

bash is already the newest version. https://ubuntuforums.org/archive/index.php/t-499045.html Remove advertisements Sponsored Links adadevil View Public Profile Find all posts by adadevil

Page 1 of 2 1 2 > « Previous Thread | Next Thread » Thread Tools Syntax Error ( Unexpected In Shell Script What OS is running on the machine where the app works? Syntax Error At Line 1 (' Unexpected In Shell Script if you do not know what the contents of a file are, it helps to identify it first, as using cat or more on an executable binary can cause unexpected results.

As you can probably tell I'm quite new to Linux (currently trying to convert my Powershell scripts shell/bash scripts). this content Unix & Linux Stack Exchange works best with JavaScript enabled UNIX & Linux Forums > Top Forums > UNIX for Dummies Questions & Answers Member Name Remember All rights reserved. The Finslerian version of the Nash embedding theorem Enable Wireless on Fresh Debian Build Magic Item Distribution? Syntax Error ( Unexpected Ubuntu

I am sorry about the confusion. Minimum of a function on an open interval What was the first operating system to feature a separate kernel? Print some JSON Is there a word for "timeless" that doesn't imply the passage of time? weblink I executed as bash test.sh but it did not work either. –NecNecco Aug 24 '14 at 14:49 bash in POSIX mode doesn't support that syntax either (when called with

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... Bash Function Syntax Error Unexpected Unix & Linux Stack Exchange works best with JavaScript enabled current community chat Unix & Linux Unix & Linux Meta your communities Sign up or log in to customize your list. You'd probably do better to use $(...) in place of the back ticks.) Also, as Sami Laine points out in his answer, it would be better if you quoted the regex

rwxr-xr-x permissions)?

When bash is invoked with name sh, bash enters posix mode (Bash Startup Files - Invoked with name sh). ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0. Does the reciprocal of a probability represent anything? Syntax Error At Line 1 (' Unexpected Solaris But It's run on centos without any issues. #!/bin/sh # TODATE=`date '+%Y-%b-%d'` # # Backup Creation for Databases # databases=(`echo 'show databases;' | mysql -u root -ppaSSword | grep -v ^Database$`)

Level? Try comparing sh --version on both machines. So why does Ubuntu have to be different? check over here more hot questions question feed default about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation