Skip to main content.
home | support | download

Back to List Archive

Re: Swish 2.2 termination status values.

From: William Bailey <wb(at)>
Date: Fri Sep 12 2003 - 10:25:49 GMT
Sorry Bill but thats not what i ment. :(

I understand that if err: is in the output then something has gone wrong 
(unless its no results). What i was really talking about some kind of return 
status value.

Was thinking about something like this:

#include <stdlib.h>
exit( status );


int status;
    is a status that will be returned to whatever called the current program. 

At the moment i'm reading the output to find errors and matching the string 
value to find out exactly what error was just thrown. It works but if any 
changes are made to the output description then i need to amend the php 
class. If there is a different exit status for the different err types then 
it would make scripting with swish-e a lot more friendly in any language that 
can return the exit status of the application that was just run.

For example you could have:

exit status:-      What:-
  0                  Good, Results
  1                  Good, No Results
  2                  Bad, Unknown switch
  ...                ...

Hope this makes things a bit more clear.

On Thursday 11 September 2003 15:11, Bill Moseley wrote:
> On Thu, Sep 11, 2003 at 02:16:34AM -0700, William Bailey wrote:
> > Does anybody know where i can find any documentation about the
> > termination status that swish return when it finishes running?
> # SWISH format: 2.4.0-pr2
> # Search words: foo
> # Removed stopwords:
> err: no results
> .
> moseley@bumby:~$ swish-e -q foo || echo "bad"
> err: Unknown switch '-q'.  Use -h for options.
> .
> bad
> moseley@bumby:~$ swish-e -i 1.html -v0|| echo "bad"
> moseley@bumby:~$ swish-e -i 1xx.html -v0|| echo "bad"
> Warning: Invalid path '1xx.html': No such file or directory
> err: No unique words indexed!
> .
> bad

	William Bailey.
	Pro-Net Internet Services Ltd.
Received on Fri Sep 12 10:26:03 2003