bBox_Sort( mode; text; {; ...} )

Parameters:
   mode:
      0 = convert both input and output line endings
      1 = skip conversion of carriage returns (the FileMaker end-of-line marker) to new lines
      2 = skip translation of new lines in shell output to carriage returns
      3 = don't translate input or ouput line endings
      4 = don't wait for completion
   text: text to send to sort ("" if not needed)
   param1: sort command option or file path, or ""
   …: additional sort parameters or file paths (optional)

Result:
   sorted values or result of sort test

Error:
   bBox_LastError ("posix")

Script Step:
   none

––––––––––

First appeared in: 0.3

Examples in demo file: 3

Compatibility:   WPE, WebDirect, Ubuntu, Server, macOS, Client

––––––––––

Sort, or check if sorted, the lines of newline (\n) or null delimited lines.

Input can either be provided by the text parameter, or a file path can be specified in one of the parameters.

A check for sortedness will return an error of 1 and a result of "?" if not sorted.

The fields to use for keys can be specified using the -k or --key option.

Duplicate values can be stripped using the -u/--unique option.