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

Syntax Error Near Unexpected Token Fi' Shell Script

Contents

I'm sorry but I don't understand what you mean by this. Top Log in or register to post comments Like Leave this field blank Click Here! This $'' syntax is explained here To make it completely perfect you should place -- before arbitrary filenames, otherwise rm might treat it as a parameter if the file name starts How can I stun or hold the whole party? http://mmonoplayer.com/syntax-error/syntax-error-near-unexpected-token-then-39-in-shell-script.html

How could I have modern computers without GUIs? You are currently viewing LQ as a guest. Apache log Syntax Error: “)” unexpected21Syntax error near unexpected token 'fi'3Jenkins Update Syntax error: end of file unexpected (expecting “)”) Execute Shell0Error calling system() within awk0“Syntax error” word unexpected0syntax error near What are the ground and flight requirements for high performance endorsement?

Syntax Error Near Unexpected Token Fi' Shell Script

Is it a coincidence that the first 4 bytes of a PGP/GPG file are ellipsis, smile, female sign and a heart? bash share|improve this question asked Dec 14 '13 at 18:33 Calvin Koder 1661210 add a comment| 4 Answers 4 active oldest votes up vote 26 down vote accepted As well as Last edited by Don Cragun; 09-17-2014 at 07:19 AM.. Thanks Last edited by vbe; 09-16-2014 at 09:58 AM.. Remove advertisements Sponsored Links manuswami View Public Profile Visit manuswami's homepage!

Does using documentation as a developer make me look unprofessional? 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 You entered: if [1==2] then echo "y" fi; ; The first line was perfectly valid syntax as far as the shell was concerned. Syntax Error Near Unexpected Token Fi Linux How to decrypt .lock files from ransomeware on Windows How do I reassure myself that I am a worthy candidate for a tenure-track position, when department would likely have interviewed me

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 Syntax Error Near Unexpected Token Fi Mac Deep theorem with trivial proof Plus and Times, Ones and Nines Amplifier circuit woe Ordering a bulky item in the USA Schengen visa to Norway to visit my wife refused Can Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Which window?

The time now is 10:20 PM. Syntax Error Near Unexpected Token For If you'd like to contribute content, let us know. Understanding the grammar: «illis Evangelii nuntiandi praebens mandatum» Eating Skittles Like a Normal Person Does using documentation as a developer make me look unprofessional? All Rights Reserved.

Syntax Error Near Unexpected Token Fi Mac

Is an internal HDD with Ubuntu automatically bootable from an external USB case? Thus, bash gets confused when the next thing it sees is fi. Syntax Error Near Unexpected Token Fi' Shell Script Can a free radical be created by chemical reaction of non-radical species? Syntax Error Near Unexpected Token Fi' In Unix Join them; it only takes a minute: Sign up Syntax error: “fi” unexpected (expecting “then”) in bash script up vote 1 down vote favorite I try to do the script: #!/bin/bash

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 this content asked 1 year ago viewed 2763 times active 1 year ago Get the weekly newsletter! What does "put on one's hat" mean? asked 2 years ago viewed 1295 times active 2 years ago Related 6PHP syntax error “unexpected $end”4Confusing syntax error near unexpected token 'done'0Executing Shell Script from PHP. Syntax Error Near Unexpected Token Fi' Cygwin

Understanding the grammar: «illis Evangelii nuntiandi praebens mandatum» Close current window shortcut How to properly localize numbers? Why would a NES game use an undocumented 1-byte or 2-byte NOP in production? A pilot's messages How secure is a fingerprint sensor versus a standard password? http://mmonoplayer.com/syntax-error/syntax-error-near-unexpected-token-shell-script.html What are some counter-intuitive results in mathematics that involve only finite objects?

Notices Welcome to LinuxQuestions.org, a friendly and active Linux Community. Fi' Unexpected Ksh Idiomatic Expression that basically says "What's bad for you is good for me" Grass grows through the floor of my building How can I stun or hold the whole party? What are the ground and flight requirements for high performance endorsement?

What is this strange biplane jet aircraft with tanks between wings?

If it isn't then it won't. –Jason Colyer Nov 13 '14 at 18:25 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Find More Posts by Simon Bridge 09-06-2008, 06:48 AM #3 uselpa Senior Member Registered: Oct 2004 Location: Luxemburg Distribution: Slackware, OS X Posts: 1,507 Rep: It's because the 'else' This site is not affiliated with Linus Torvalds or The Open Group in any way. Syntax Error Near Unexpected Token `then' But when I type "1" and hit [Enter] it outputs this and terminates: ./control-openvpn.sh: 27: ./control-openvpn.sh: Syntax error: "fi" unexpected Here is the main part of my code.

pls note that I add #else with the script. Difficulties interpreting this complex sentence How to reward good players, in order to teach other players by example Complimenting the author of a textbook Aligning texts side by side with equations Difficulties interpreting this complex sentence Most useful knowledge from the 30's to understand current state of computers & networking? check over here Browse other questions tagged bash command-line scripting sh or ask your own question.

What are the downsides to multi-classing? Not the answer you're looking for? split strings and add them as new row In 5e, do you get to use the extra attack as well when you ready an attack action? 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.

Am I being a "mean" instructor, denying an extension on a take home exam Feynman diagram and uncertainty How secure is a fingerprint sensor versus a standard password? If you need to reset your password, click here. Most useful knowledge from the 30's to understand current state of computers & networking? Learn More © 2016 The Linux Foundation current community blog chat Server Fault Meta Server Fault your communities Sign up or log in to customize your list.

Can you check with cat -v or simply create a new script and copy/paste the above yourself? Just put a # before the else as well. perl -pi.bak -e 's/\r$//' /home/pi/sh/test.sh share|improve this answer edited May 4 '15 at 19:16 answered May 4 '15 at 19:07 tivn 1,39739 add a comment| Your Answer draft saved draft TV episode or movie where people on planet only live a hundred days and fall asleep at prescribed time How could I have modern computers without GUIs?