Bash Syntax Error Redirection Unexpected
These numbers are called "file descriptors". (…) The redirection operators can be preceded by one or more digits (with no intervening
Realism of a setting with several sapient anthropomorphic animal species Video displays in Star Wars Good way to explain fundamental theorem of arithmetic? make View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by make Thread Tools Show Printable Version Email this Page Search this Thread Advanced I'm very confused by this. The default system shell in Ubuntu is dash, not bash, so if you have #!/bin/sh then your script will be using a different shell than you expect.
/bin/sh 1 Syntax Error Redirection Unexpected
Is there any other way? Executing sudo sh ./sonar.sh console. Join 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 What am I doing wrong?
Is 8:00 AM an unreasonable time to meet with my graduate students and post-doc? I ran "/usr/sbin/update-binfmts --display" expecting to see an association between a "sh" extension and "/bin/sh" but there was none. Yes, of course I'm an adult! Bash Syntax Error Near Unexpected Token Done' Williams 114 You might want to read about the select command in bash. –chepner Sep 13 '13 at 13:12 add a comment| 2 Answers 2 active oldest votes up
Running the scripts with "bash script-name" is fine with me, regardless of the extensions. If not, why? Good way to explain fundamental theorem of arithmetic? 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.
Sometimes some hidden characters are there in the source. Bash Syntax Error Near Unexpected Token Echo' You have two options to make sure the script is interpreted by bash: Move the shebang to the first line Run sudo like this: sudo bash ./pi_dev_env_install.sh share|improve this answer answered asked 4 years ago viewed 103156 times active 10 months ago Related 2Shell script error message1/shell-script: syntax error near unexpected token `done'4Shell Script - syntax error near unexpected token `else'0Shell script Just checked the spam folder, nope no e-mail from Github there too.
Bash Syntax Error Unexpected Token
When all is fixed, change the shebang to #!/bin/bash. This will output a HTML-free plaintext version of the file that cau be wget-ted. /bin/sh 1 Syntax Error Redirection Unexpected Browse other questions tagged command-line scripts or ask your own question. Bash Syntax Error Unexpected End Of File Rosa Parks is a [symbol?] for the civil rights movement?
You also gave yourself and all other users read and write permissions, as well as execute permission to all other users. Adding the shebang line solved it immediately. +1. –bkd.online Oct 9 '13 at 5:14 Facing the issue running sonarqube.sh on Ubuntu 15.10. What to tell to a rejected candidate? navigate here It must be prefixed by ./ or similar.
Given the line the error is on, it looks like you're trying to run an HTML file. Bash Syntax Error Near Unexpected Token (' Ubuntu How to deal with a very weak student? To run it as root, put sudo in front of the command that runs it.
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.
asked 1 year ago viewed 1344 times active 1 year ago Related 4Do redirection operators always open file descriptors in parallel?0Capture Error of LS to file2syntax error: unexpected end of file9Unexpected Yet most shells only parse the number before the operator as a file descriptor if it consists of a single digit. This site is not affiliated with Linus Torvalds or The Open Group in any way. Do COB LEDs usually need electrically insulating from the heatsink?
wait till someone tracks down the source and posts here 1 members found this post helpful. Can a creature benefit from differently typed speed bonuses all named fast movement? Why? Verbs of buttons on websites Symbolic comparison of recursive functions GTIN validation Why write an entire bash script in functions?
current community chat Unix & Linux Unix & Linux Meta your communities Sign up or log in to customize your list. Try to move the shebang in line 1. –manatwork Aug 18 '12 at 11:45 According to that article calling /bin/bash directly instead of /bin/sh will; correctly use bash instead How does Gandalf get informed of Bilbo's 111st birthday party? Intuition behind Harmonic Analysis in Analytic Number Theory My girlfriend has mentioned disowning her 14 y/o transgender daughter Unexpected parent process id in output Does mean=mode imply a symmetric distribution?
There is nothing about this line running as sudo that should stop it working to my knowledge, does anyone have any ideas? This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. How to handle spending money for extended trip to Europe?