aspose file tools
The moose likes Linux / UNIX and the fly likes shell script question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Reply Bookmark "shell script question" Watch "shell script question" New topic
Author

shell script question

Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 251
Want to monitor tomcat shutdown with the following script. However, it is returning '[: too many arguments]'. It works without the '-a $cnt -gt 0' part, but I don't want it to hang indefinitely.



http://www.goodercode.com
SCJP 1.4
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14491
    
    7

Am I missing something here? Without the countdown it shouldn't be hanging indefinitely, it should be looping forever.


Customer surveys are for companies who didn't pay proper attention to begin with.
Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 251
Tim Holloway wrote:Am I missing something here? Without the countdown it shouldn't be hanging indefinitely, it should be looping forever.


yea, I don't want it to loop forever. Just can't figure out why the -a {condition} is not working properly.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 10824
    
  25

I would probably change to compound test commands rather than builtin test commands - just because I find it easier to work with. So something like:



The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14491
    
    7

There may be an operator precedence issue. Try putting the "-z ps" clause in parentheses.
Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 251
Thanks for the help, here is what finally worked...

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: shell script question
 
Similar Threads
source cod for selection and saving the pdf document
Populating the ComboBox by selecting another
need counter example
Display problem of drop down and div
unwrap a buffer