Home > Syntax Error > Syntax Error Near Unexpected Token Fi' Shell Script

Syntax Error Near Unexpected Token Fi' Shell Script

Contents

Ordering a bulky item in the USA Is an internal HDD with Ubuntu automatically bootable from an external USB case? Word for nemesis that does not refer to a person How do I politely decline a research grant? Display a Digital Clock Why does MIT have a /8 IPv4 block? 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 his comment is here

This is explained here. Join them; it only takes a minute: Sign up Syntax error near unexpected token 'fi' in shell script sqlplus up vote 0 down vote favorite I'm having an issue here when What does "put on one's hat" mean? Top Log in or register to post comments Like Leave this field blank Click Here!

Syntax Error Near Unexpected Token Fi' Mac

thanks in advance... Amplifier circuit woe Is an internal HDD with Ubuntu automatically bootable from an external USB case? Feynman diagram and uncertainty Add a language to a polyglot Deep theorem with trivial proof Joining two lists with relational operators Anxious about riding in traffic after 20 year absence from Is it a coincidence that the first 4 bytes of a PGP/GPG file are ellipsis, smile, female sign and a heart?

How many times do you need to beat mom and Satan etc to 100% the game? The corrected command is below. #!/bin/bash if [ -e /fms2005/Sample/CronFlag.txt ] ; then echo "data file does exist" else echo "data file does not exist" fi Top Log in or register share|improve this answer edited Mar 24 '15 at 6:39 answered Mar 24 '15 at 6:22 paxdiablo 499k1229851441 Used the suggested commands and it did not work. Syntax Error Near Unexpected Token `then' share|improve this answer answered Apr 5 '15 at 19:51 Ashish Srivastava 766 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google

asked 1 year ago viewed 597 times active 11 months ago Related 1/shell-script: syntax error near unexpected token `done'2command not found and syntax error near unexpected token2bash: syntax error near unexpected Syntax Error Near Unexpected Token Fi' In Unix Please click the link in the confirmation email to activate your subscription. In addition you need to put the echo output in quotes. asked 2 years ago viewed 45488 times active 2 years ago Get the weekly newsletter!

else .. Syntax Error Near Unexpected Token Else e.g:- 062000002015.00"; echo "Example: sh run_billing.sh 062000002015.00"; exit 1 fi if [ $NARGS -eq 2 ] then echo "Run Billing script - pin_bill_day"; pin_virtual_time -m2 $1; pin_bill_day; fi shell scripting share|improve The shell will interpret than as part of test-commands, but then it finds a fi statement, which is incorrect (and, yes, unexpected) because it never encountered the then part. How can I stun or hold the whole party?

Syntax Error Near Unexpected Token Fi' In Unix

Please click the link in the confirmation email to activate your subscription. How could I have modern computers without GUIs? Syntax Error Near Unexpected Token Fi' Mac 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 Syntax Error Near Unexpected Token Fi' Cygwin printfs first argument is the format string (in this case, "su"), hence, it will print su.

Browse other questions tagged bash or ask your own question. http://allconverter.net/syntax-error/syntax-error-near-unexpected-token-do-shell.html To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will If then is in the 1st line, you use ;. If so, it probably contains DOS line endings, which can confuse the bash parser. Syntax Error Near Unexpected Token For

Unable to complete a task at work. 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 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 http://allconverter.net/syntax-error/syntax-error-near-unexpected-token-done-shell-script.html How to reward good players, in order to teach other players by example An expensive jump with GCC 5.4.0 Unable to complete a task at work.

How to decrypt .lock files from ransomeware on Windows more hot questions question feed lang-sh about us tour help blog chat data legal privacy policy work here advertising info mobile contact Syntax Error Near Unexpected Token `done' Will majority of population dismiss a video of fight between two supernatural beings? also, consider if :; then :; fi >>log –mikeserv Dec 5 '15 at 4:53 or use the character \ for breaking lines so it would be easier to read.

the sum of consecutive odd numbers What do you do with all the bodies?

That should solve this problem. asked 3 years ago viewed 14013 times active 3 years ago Get the weekly newsletter! I could edit it out, but the damage has been done. Syntax Error Near Unexpected Token (' Bash Thanks so much!

On debut run, I get the same error. Remnants of the dual number Complimenting the author of a textbook how to match everything between a string and before next space Change syntax of macro, to go inside braces What Did millions of illegal immigrants vote in the 2016 USA election? check over here split strings and add them as new row Close current window shortcut VT-x is not available, but is enabled in BIOS Joining two lists with relational operators Is it a coincidence