return (and exit) returns an exit code between 0 and 255. Zero means true and anything else means false
If you want a function to "return" a value, use printf or echo. On Fri, Aug 5, 2011 at 6:41 PM, Linda Walsh <b...@tlinx.org> wrote: > > > > I guess I don't use negative return codes that often in shell, but > I use them as exit codes reasonably often. > > 'return' barfs on "return -1"... > > Since return is defined to take no options, and ONLY an integer, > as the return code, it shouldn't be hard to fix. > > Seem to fail on any negative number, but 'exit status' is defined > as a short int -- not an unsigned value (i.e. -1 would return 255). > > > > > > -- Visit serverfault.com to get your system administration questions answered.