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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 1511


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: 5772
    
    7

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



JBoss In Action
Akhilesh Trivedi
Ranch Hand

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