Rc.local Syntax Error 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 syntax error unexpected in unix of this site About Us Learn more about Stack Overflow the company Business
Syntax Error ( Unexpected Bash Array
Learn more about hiring developers or posting ads with us Unix & Linux Questions Tags Users Badges Unanswered Ask Question line 1: syntax error: unexpected word (expecting ")") _ Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute: Sign up Here's bash function syntax error unexpected how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Shell script fails: Syntax error: “(” unexpected up vote 31 down vote favorite 7 I've been working on a script that automates setting up a development environment for Raspberry Pi development (step by step details that work are here). The script is
Syntax Error At Line 1 (' Unexpected Solaris
linked in that article but convenience you can find it here also. Now when run this script install and sets up the environment without error but you have to enter your sudo password more than once due to sudo's time-out value by default. So I started experimenting by removing all the sudo lines and running the whole script via sudo at the command line like so: kemra102@ubuntuvm:~$ sudo ./pi_dev_env_install.sh This works fine as expected and gets most of the way through until this point: ./pi_dev_env_install: 68: ./pi_dev_env_install.sh: Syntax error: "(" unexpected Now this line worked fine previously when not running the whole script with sudo. There is nothing about this line running as sudo that should stop it working to my knowledge, does anyone have any ideas? bash shell ubuntu shell-script share|improve this question edited Aug 18 '12 at 12:08 Gilles 373k696801129 asked Aug 18 '12 at 11:37 kemra102 4731613 The shebang is really in line 9? Due to Ubuntu's DashAsBinSh affinity I suspect your script is interpreted by dash instead of bash. Try to move the shebang in line 1. –manatwork Aug 18 '12 at 11:45 Accor
Sign in Pricing Blog Support Search GitHub syntax error at line newline unexpected This repository Watch 1 Star 5 Fork 0 ksh unexpected scode/arch4ec2 Code Issues 2 Pull requests 0 Projects 0 Pulse Graphs New issue
Is Not Expected
still have syntax error in rc.local #2 Closed scode opened this Issue Oct 23, 2011 · 0 comments Labels None http://unix.stackexchange.com/questions/45781/shell-script-fails-syntax-error-unexpected yet Milestone No milestone Assignees No one assigned 1 participant Owner scode commented Oct 23, 2011 /etc/rc.local: line 26: unexpected EOF while looking for matching `)' /etc/rc.local: line 28: syntax error: unexpected end of file scode added a commit that closed https://github.com/scode/arch4ec2/issues/2 this issue Oct 23, 2011 scode #2 10ca0d1 scode closed this in 10ca0d1 Oct 23, 2011 Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Contact GitHub API Training Shop Blog About © 2016 GitHub, Inc. Terms Privacy Security Status Help You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
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 answers to any questions you http://askubuntu.com/questions/521207/syntax-error-unterminated-quoted-string might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join syntax error them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top “Syntax error: Unterminated quoted string” up vote 2 down vote favorite I am trying to use a backup script that will backup my sql database syntax error unexpected and website files. I am running Ubuntu 12.04 32 bit version and zPanel. Here is what my DB structure is along with which DB I want to backup: In my script I also did not know what to put in at: MYSQL="$()" MYSQLDUMP="$()" GZIP="$()" So I just put my DB name in for the first two and .gz in the third one. Here is the script: #!/bin/sh #---------------------------------------------------------------- # Daily Backup Routine - Backup and Sync to Dropbox # This script creates a backup using today's date, then deleted # any backups made 3 days ago. If run every day it will ensure # you have a week's worth of backups of your MySQL databases and # zPanel web directories. # # Uses whatever Dropbox account is running on the server. # # Written by Richard Ferreira for the backup of zPanel websites. # Contact me - richard[at]beetle001.com #---------------------------------------------------------------- # # Before we get started, we should set some parameters. We'll need these for later.