aspose 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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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: 5823
    
    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