Purpose

Check the OUTDIR directory for the highest numbered RED
*.fits* file, and return that value PLUS ONE. If no images
matching the template are found in the directory, return 1.

Usage

nextfiler

Arguments

none

Output

1+index number of the last image (leading zeros removed), or
-1 if output directory was not found

Exit values

0 = normal exit
-1 = output directory not found

Example

To get the index number one above the last saved RED image, type
nextfiler