File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes if else in Script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "if else in Script" Watch "if else in Script" New topic
Author

if else in Script

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526


I have the above script, when i run it, i get

syntax error at line 4 : `else' unexpected

why?


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

Which shell are you using? For bash, I usually use:



JBoss In Action
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
Thanks i was on ksh.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: if else in Script
 
Similar Threads
get value on click from table using javascript
Search on a string
How to retain the value of drop down on click of browser back button
applet refresh event
jquery - ID dos not appere in --> getJSON