Home > Syntax Error > Bash Syntax Error Near

Bash Syntax Error Near

Contents

asked 1 year ago viewed 1204 times active 1 year ago Related 3004Getting the Current/Present working directory of a Bash script from within the script2Bash syntax error when commented out if What is this strange biplane jet aircraft with tanks between wings? OK, here it goes. > #!/bin/bash > > > echo "*****Welcome to User Administration Program*****" > > for ((i=0;i<3;++i)) > #for i in `seq 1 3` > do > > count=`expr Is the script you quote in the question really exactly as the one you're executing? his comment is here

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 Square root image filter tool in Python Grass grows through the floor of my building Am I being a "mean" instructor, denying an extension on a take home exam Add a It is both a command and a website, so you can paste your script in http://www.shellcheck.net/. Thanks in advance. 2.

Bash Syntax Error Near

Are you new to LinuxQuestions.org? grail View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by grail 05-10-2010, 10:03 PM #10 lucmove Member Registered: Aug 2005 Location: Brazil more hot questions 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 Science Other

Having a problem logging in? Who is spreading the rumour that Santa isn't real? share|improve this answer answered Nov 9 '12 at 19:54 David R Tribble 6,53922144 Thank you for the feedback! Syntax Error Near Unexpected Token If Because otherwise it will not be recognized as a parameter of its own.

It should be: if [ "$i" == '.' ] then or if [ "$i" == '.' ]; then Hope this helps. Syntax Error Near Unexpected Token Then' In Unix Bounce off the atmosphere at reentry? asked 2 years ago viewed 4408 times active 2 years ago Related 8syntax error near unexpected token `('2syntax error near unexpected token0syntax error near unexpected token `fi'8syntax error near unexpected token Join them; it only takes a minute: Sign up Syntax error near unexpected token 'else' up vote -1 down vote favorite I have looked at this for about 30 minutes now

A good way to provide a wrong answer first, then keep editing before someone else provides the correct answer. Syntax Error Near Unexpected Token Elif' Shell Script How to construct a 3D 10-sided Die (Pentagonal trapezohedron) and Spin to a face? French vs Italian resistance Idiomatic Expression that basically says "What's bad for you is good for me" Is it unethical to take a photograph of my question sheets from a sit-down Remove advertisements Sponsored Links Ren_kun View Public Profile Find all posts by Ren_kun

« Previous Thread | Next Thread » Thread Tools Show Printable Version Email this Page Subscribe to

Syntax Error Near Unexpected Token Then' In Unix

Word for nemesis that does not refer to a person Word that includes "food, alcoholic drinks, and non-alcoholic drinks"? 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 Bash Syntax Error Near elif [ $param=='' ]; then default() else specific() fi exit 0 Here is the error code. Syntax Error Near Unexpected Token Fi' Shell Script If you do not put a space after [ the shell will try to execute [whatever as command and fail.

Hit a curb today, taking a chunk out of the tire and some damage to the rim. this content The shell executes the command [ with the rest as parameters, including the ] as mandatory last parameter. How to write an effective but very gentle reminder email to supervisor to check the Manuscript? Gallen, Switzerland Posts: 6,504 Thanks: 162 Thanked 533 Times in 466 Posts Do you mind posting that code with marking, copy&paste instead? Syntax Error Near Unexpected Token Then' In Shell Script

Gallen, Switzerland Posts: 6,504 Thanks: 162 Thanked 533 Times in 466 Posts That window looks like a Windows command window. Add a language to a polyglot How secure is a fingerprint sensor versus a standard password? Search this Thread 05-10-2010, 04:32 AM #1 lucmove Member Registered: Aug 2005 Location: Brazil Distribution: Debian Jessie Posts: 715 Rep: bash: syntax error near unexpected token `else' Code: for http://mmonoplayer.com/syntax-error/syntax-error-near-unexpected-token-elif-39-bash.html Thanks again for the help! –user1801053 Jan 1 '13 at 0:50 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign

asked 4 years ago viewed 737 times active 4 years ago Related 20syntax error near unexpected token `$'in\r''0Syntax error near unexpected token “elif” in bash1make error (Windows) : line 1: syntax Syntax Error At Line Unexpected Can a creature with 0 power attack? how to match everything between a string and before next space Anxious about riding in traffic after 20 year absence from cycling Square root image filter tool in Python Is the

But, i got a suggestion that "nawk" is not installed in most servers.

This happens with or without arguments inputted. Remnants of the dual number Is the partition function of non-conformal theories on a torus modular invariant? Conditions in script are enclosed with [] not () Please read how to use if statement/syntax. Syntax Error Near Unexpected Token In Shell Script Introduction to Linux - A Hands on Guide This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started

Is there any financial benefit to being paid bi-weekly over monthly? You should be able to right click on the title bar and select setting for editing etc. (only got the German version here sorry). How do I reassure myself that I am a worthy candidate for a tenure-track position, when department would likely have interviewed me even if I wasn't? check over here what's the error? –qqibrow Jan 20 '15 at 22:15 sorry new to stack overflow and learning formatting, i edited my comment above –Devin Baize Jan 20 '15 at 22:16

asked 4 months ago viewed 55 times active 4 months ago Get the weekly newsletter!