Syntax Error Fi Unexpected
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 Close current window shortcut Is the partition function of non-conformal theories on a torus modular invariant? Actually, it's better to ask such questions here: stackoverflow.com , as it is related to shell programming. –whtyger Mar 6 at 16:31 add a comment| active oldest votes Know someone who 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 his comment is here
deb4you View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by deb4you 09-06-2008, 09:37 AM #5 uselpa Senior Member Registered: Oct 2004 Location: Simon Bridge View Public Profile View LQ Blog View Review Entries View HCL Entries Visit Simon Bridge's homepage! by default for a noninteractive script (eg cron driven), which usually ends up in a script that was written with bash specific features to almost work in the most confusing way. Contact Us - Advertising Info - Rules - LQ Merchandise - Donations - Contributing Member - LQ Sitemap - Main Menu Linux Forum Android Forum Chrome OS Forum Search LQ
Syntax Error Near Unexpected Token Fi' Shell Script
Hit a curb today, taking a chunk out of the tire and some damage to the rim. What does "put on one's hat" mean? 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.
You are currently viewing LQ as a guest. 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 Last edited by Don Cragun; 09-17-2014 at 07:19 AM.. Syntax Error Near Unexpected Token Fi Linux Original file will be backed up.
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 Syntax Error Near Unexpected Token Fi Mac Binary to decimal converter Hit a curb today, taking a chunk out of the tire and some damage to the rim. I tried lots of varieties. For instance, if there's a file called 2 in the current directory, that becomes: if 2 then echo fi; That is run the 2 command with 4 arguments: 2, then, echo
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 Syntax Error Near Unexpected Token For Print This Log in or register to post comments Like (0 likes) 2 Comments Comments RecommendedDate October 8, 2010 #2 mfillpot You don't need the double brackets and you don't need Forum Operations by The UNIX and Linux Forums Latest LQ Deal: Linux Power User Bundle Blogs Recent Entries Best Entries Best Blogs Blog List Search Blogs Home Forums HCL Reviews Tutorials syntax error: unexpected end of file error jedzio Shell Programming and Scripting 10 08-01-2014 10:03 AM syntax error: `$' unexpected paragkhanore Shell Programming and Scripting 4 06-07-2010 03:57 PM unexpected syntax
Syntax Error Near Unexpected Token Fi Mac
What are some counter-intuitive results in mathematics that involve only finite objects? Browse other questions tagged bash syntax scripting or ask your own question. Syntax Error Near Unexpected Token Fi' Shell Script What are some counter-intuitive results in mathematics that involve only finite objects? Syntax Error Near Unexpected Token Fi' In Unix 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
Once you have removed the
Browse other questions tagged bash or ask your own question. Having a problem logging in? See here. –terdon♦ Sep 30 '13 at 16:08 add a comment| Not the answer you're looking for? weblink If you need to reset your password, click here.
Hot Network Questions Why are terminal consoles still used? Fi' Unexpected Ksh 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 What does "put on one's hat" mean?
Type type [ to see what is really happening.
Just starting out and have a question? What are the ground and flight requirements for high performance endorsement? It is of the form: if cmd args In this case, cmd is derived from the expansion of the [1==2] glob. [1==2] is a globbing pattern that expands to the list Syntax Error Near Unexpected Token `then' A pilot's messages Why is bench pressing your bodyweight harder than doing a pushup?
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. I can only recreate the error you're citing by removing the space between the if and the [ character. Linked 4 How to find/fix files with MIXED line endings (0x0d 0x0d 0x0a) Related 3004Getting the Current/Present working directory of a Bash script from within the script790How do I parse command check over here 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 What are some counter-intuitive results in mathematics that involve only finite objects? Secret salts; why do they slow down attacker more than they do me? 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
Why is the Vitamin B complex, a "complex"? Or have semicolon in front of them: if [ 1 == 2 ]; then echo "y"; fi. How can I stun or hold the whole party? If it is listening it'll reply.
Close current window shortcut How to reward good players, in order to teach other players by example Who is spreading the rumour that Santa isn't real? Now it is running fine from command prompt but that window got exit. One more doubt........ Saving your script gives me a similar syntax error in dash (although it's an unexpected end-of-file rather than unexpected "fi").