Home > Syntax Error > Unix Syntax Error If Unmatched

Unix Syntax Error If Unmatched


The problem I am facing is that, when I run this script on SunOS, then system executes this script just perfectly and creates an output file. matthewg42 View Public Profile View LQ Blog View Review Entries View HCL Entries Visit matthewg42's homepage! What are the large round dark "holes" in this NASA Hubble image of the Crab Nebula? very lightweight low power microcontroller with memory? http://crimsonskysoftware.com/syntax-error/unix-syntax-error-unmatched.html

And you should be aware this is an Oracle forum and not a Unix one. Suggested Solutions Title # Comments Views Activity either24 challenge 19 73 83d has12 challenge 13 53 86d modThree challenge 4 54 83d wefewf 2 28 61d Getting Started With Go Programming Checking File Size in a Shell Scripting White Papers & Webcasts Simplify and consolidate data protection for better business results Deploy a dynamic, services-oriented cloud for your business Avoiding the Shoebox: Installing the real ksh to handle one such problem like this seems like wasted effort.

Ksh Syntax Error If' Unmatched

All product names are trademarks of their respective companies. Thank you for your earlier reply, I would have never known that spaces were needed inside the brackets! That sets the text off as code and makes it easier to read ...

if I remove the #!/xxx line the script is executed and returns:# /home/vanadm/iftest/home/vanadm/iftest: Syntax error at line 1 : `if' is not matched.I am root, all files are rwxrwxrwx, and /usr/bin/sh Regards, Amber Taylor Remove advertisements Sponsored Links akpopa View Public Profile Find all posts by akpopa

Page 1 of 4 1 234 > « Previous Thread | Next Thread This is common for new UNIX users. Hope This Helps, PH.FAQ219-2884: How Do I Get Great Answers To my Tek-Tips Questions?FAQ181-2886: How can I maximize my chances of getting an answer?

Top Best Answer 0 Mark this reply as the best answer?(Choose carefully, this can't be changed) Yes | No Saving... If Unmatched Error In Unix Shell Script almost never) Best wishes ... PingMe replied Jul 7, 2011 I make sure I have execute right to lookup_tables.sas and I tried your code as follows and get another error - 'then' unmatched. https://community.hpe.com/t5/System-Administration/if-is-not-matched-message-in-shell-script/td-p/2814912 Join Us! *Tek-Tips's functionality depends on members receiving e-mail.

Go to Solution. 0 Kudos Reply All Forum Topics Previous Topic Next Topic 19 REPLIES Ian Dennison_1 Honored Contributor [Founder] Options Mark as New Bookmark Subscribe Subscribe to RSS Feed Highlight Comments from my seniors: ======== Well, it appears that we are running a different korn shell then we were on the Sun boxes. it replaces the ctrl M character with unix line end. –Ajay Feb 26 at 15:53 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign First, I am happy to hear that you may have found some reason why the script behaves as it does.

  1. Jalal Hajigholamali replied May 16, 2013 Hi, Break line: "then for cell in $cell_list " to - then for cell in $cell_list do .... ...
  2. davegu1 replied May 17, 2013 You are telling to read some variables not defined and are using other scripts not specified.
  3. Join & Ask a Question Need Help in Real-Time?
  4. Find all posts by PxT #3 09-04-2001 akpopa Registered User Join Date: Aug 2001 Last Activity: 15 November 2001, 8:02 PM EST Location: South Carolina Posts: 18 Thanks:
  5. Cancel Red Flag SubmittedThank you for helping keep Tek-Tips Forums free from inappropriate posts.The Tek-Tips staff will check this out and take appropriate action.
  6. Password Programming This forum is for all programming questions.
  7. Any ideas!!

If Unmatched Error In Unix Shell Script

Watch your DNS record syntax... http://www.orafaq.com/forum/t/97699/ Solutions? Ksh Syntax Error If' Unmatched Just in case...my 2 cents-- Rod Hills There be dragons... 1 Kudo Reply Tom Geudens Honored Contributor [Founder] Options Mark as New Bookmark Subscribe Subscribe to RSS Feed Highlight Print Email Syntax Error << Unmatched Join and Comment By clicking you are agreeing to Experts Exchange's Terms of Use.

Please visit this page to clear all LQ-related cookies. navigate here Not the answer you're looking for? Atleast use a code tags to format. Error 117: Drive comm Moving tape from slot 82 to slot 17... Dos2unix

Eren A. What are the German equivalents of “First World War”, “World War I”, and “WWI”? RE: syntax error at line 2 : `if' unmatched PHV (MIS) 2 Mar 12 16:28 Please, post the WHOLE script. Check This Out It's not the world's most user-friendly text editor, especially if you're used to a word processor on your PC, however it's available on every "UNIX like" system whether you use a

Brgds, Sangal_ak04 (India). You must have a white space after the open bracket and before the close bracket: [ "$somevar" = "somestring" ] The code: if "$all_recs" = "ALL"; then ...neither had the "test" Privacy Policy Site Map Support Terms of Use

more hot questions question feed about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Science

that would have solved your problem .... Here instead of using "while read LINE" after the pipe...I just counted the lines in the file and used sed -n '1p' funda inside the loop so that the LINE variables Promoted by Recorded Future Enhance your security with threat intelligence from the web. How about a numeric test?export TEST=1if (( $TEST == 1 ))then print "test is one"else print "test not one"fiI would be tempted to look at environment variables and the shell you

If you ran on Solaris, you were probably using the real Korn shell. I sent an email to our Unix admin to fix the problem. Support LQ: Use code LQ3 and save $3 on Domain Registration Blogs Recent Entries Best Entries Best Blogs Blog List Search Blogs Home Forums HCL Reviews Tutorials Articles Register Search Search this contact form Please try using full path.

Are you new to LinuxQuestions.org? It was flaky acouple of years ago, and I gave up using it, but it might be worth another look now. Give it a try. What I found is that the value inside ${ipaddr} variable is "UNKNOWN" (default value set inside the script to this variable), and somehow system is not taking the actual IP address.

Or are we left to the trial and error method? markatharvestinfotec View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by markatharvestinfotec Tags code Thread Tools Show Printable Version Email this Page Search this It does this via a command line interface, making it suitable … Document Imaging Document Management Adobe Acrobat Scripting Languages Programming Advertise Here 773 members asked questions and received personalized solutions How can I make two cutting lines close to each other?

Chris Wolf replied May 16, 2013 Yes, I just noticed that, thank you.