Home > Syntax Error > Syntax Error Got ( Expecting Newline

Syntax Error Got ( Expecting Newline

Newer Than: Search this thread only Search this forum only Display results as threads Useful Searches Recent Posts More... Plus and Times, Ones and Nines Joining two lists with relational operators Does using documentation as a developer make me look unprofessional? This site is not affiliated with Linus Torvalds or The Open Group in any way. Bollinger Mar 1, 2005 Complier error!! his comment is here

You can easily confirm this is with a simple example: # #!/bin/bash offfset=(`ls`) echo $offset Running this script with sudo will raise a syntax error in recent versions of Ubuntu and 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 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 Stay logged in Welcome to The Coding Forums!

your help is really appreciated.. share|improve this answer answered Aug 18 '12 at 12:08 Gilles 382k727031146 1 Thanks clearly a gap in my knowledge, I don't script much so wasn't aware of that! Will majority of population dismiss a video of fight between two supernatural beings? Since dash (like all other shells) is an interpreter, it won't complain until the execution reaches the problematic line.

Sign Up Now! Complimenting the author of a textbook Understanding the grammar: «illis Evangelii nuntiandi praebens mandatum» How can I stun or hold the whole party? zLog Board index Glossary FAQ Search Unanswered topics Active topics Disclaimer The team Downloads Rules Login Register Unanswered topics Active topics Disclaimer Glossary FAQ Search The team Downloads Rules Mainframe, MVS It looks like you're on a Un*x-like system, and most of those seem to use '.o' instead if you don't specify anything else. > i got this following error > "syntax

You might have meant: -o hello maybe. If you execute these commands under the z/OS Unix shell, you will get the following error (I assume that this JCL fragment is running under COZBATCH, which runs your STDIN DD zLog Portal Board index Login Username: Password: I forgot my password Resend activation email Remember me Hide my online status this session Register In order to login you must be Browse other questions tagged arrays go or ask your own question.

Most useful knowledge from the 30's to understand current state of computers & networking? Can a creature with 0 power attack? Please ensure you read any forum rules as you navigate around the board. 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

The board administrator may also grant additional permissions to registered users. Schengen visa to Norway to visit my wife refused Remnants of the dual number How to write an effective but very gentle reminder email to supervisor to check the Manuscript? Still getting the error. –soufrk Sep 1 at 6:58 @soufrk Is it sonarqube.sh or sonar.sh? Changed the header as said.

Add a language to a polyglot default override of virtual destructor the sum of consecutive odd numbers Deep theorem with trivial proof more hot questions question feed lang-golang about us tour http://mmonoplayer.com/syntax-error/syntax-error-token-39-object-39-is-unexpected-expecting.html How do I politely decline a research grant? Browse other questions tagged bash shell or ask your own question. 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.

You can avoid this by quoting or escaping the argument. asked 1 year ago viewed 3129 times active 1 year ago Related 3004Getting the Current/Present working directory of a Bash script from within the script707How do I iterate over a range Now, that leaves me puzzled. –soufrk Sep 1 at 7:07 add a comment| up vote 3 down vote If the shebang is not on the first line, it will not be weblink Was running wrong arch executable.

Deepak Guest Hi friends i tried to compile following programs and link it, i got an error like // hellofunc.h /* example include file */ extern void myPrintHelloMake(void); // hellomake.cpp #include Positivity of certain Fourier transform Why do the Avengers have bad radio discipline? Make up your mind.

error C2059: syntax error : '(' Balaji, Dec 3, 2004, in forum: C++ Replies: 3 Views: 10,508 Rade Dec 3, 2004 Error With Bound Control Causes redirection to 404 Error page

So even if the script successfully started at some point in your testing, it would have aborted once line 68 was reached. I can still move the shebang of course, but that doesn't really explain as to why it works when you don’t sudo the whole script. –kemra102 Aug 18 '12 at 11:50 Rolf Magnus, Nov 24, 2004 #3 Advertisements Show Ignored Content Want to reply to this thread or ask your own question? Why is bench pressing your bodyweight harder than doing a pushup?

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. Executing the batch export and import metadata utilities on Z/OS might result in a syntax error when one or more command options contain special characters, such as an embedded blank or The esac command in your SHARED.SH file is in the wrong case. #!/bin/sh g_dlg_yes=1 g_dlg_no=0 g_dlg_cancel=2 g_dlg_unknown=127 show_confirm_dlg() { prompt=$* resp="" while [ "$resp" != "y" ] && [ "$resp" != check over here asked 4 years ago viewed 113228 times active 1 year ago Related 2Shell script error message1/shell-script: syntax error near unexpected token `done'4Shell Script - syntax error near unexpected token `else'0Shell script

You'll be able to ask questions about coding or chat with the community and help others. Executing sudo sh ./sonar.sh console. About Us The Coding Forums is a place to seek help and ask questions relating to coding and programming languages. Since you use bash features, the first line of the file must be #!/bin/bash or #!/usr/bin/env bash.

There is nothing about this line running as sudo that should stop it working to my knowledge, does anyone have any ideas? When dash reaches line 68, it sees a syntax error: that parenthesis doesn't mean anything to it in context. 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. Member Login Remember Me Forgot your password?

Will a tourist have any trouble getting money from an ATM India because of demonetization? Word for nemesis that does not refer to a person An electronics company produces devices that work properly 95% of the time Grass grows through the floor of my building Resubmitting 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 Browse other questions tagged bash shell ubuntu shell-script or ask your own question.

regards, Deepak Deepak, Nov 24, 2004 #1 Advertisements Ron Natalie Guest Deepak wrote: \ > #include > cc -hello hellofunc.obj hellomake.obj What is "-hello" supposed to do? Not the answer you're looking for? To view the RateIT tab, click here. Join them; it only takes a minute: Sign up 'newline unexpected' Error in BASH script up vote 0 down vote favorite I have SHARED.SH file: #!/bin/sh g_dlg_yes=1 g_dlg_no=0 g_dlg_cancel=2 g_dlg_unknown=127 show_confirm_dlg()

Advertisements Latest Threads For Loop netOwen posted Nov 29, 2016 vhdl code chandan khan posted Nov 29, 2016 Altera Fpga De2 115 veek development kit chandan khan posted Nov 29, 2016 How can I stun or hold the whole party? The script is linked in that article but convenience you can find it here also. Unable to understand the details of step-down voltage regulator Why are terminal consoles still used?

An expensive jump with GCC 5.4.0 VT-x is not available, but is enabled in BIOS What are the ground and flight requirements for high performance endorsement? How to construct a 3D 10-sided Die (Pentagonal trapezohedron) and Spin to a face?