bBox_Bash

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

Parameters:
   mode:
      0 = convert both input and output line endings, wait for output
      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
      4 = don't wait for completion (asynchronous)
      32 = combine output from stdout & stderr
   text: input text to be processed
   …: additional Bash options or parameters (optional)

Result:
   stdout from Bash execution (truncated to a maximum of 160 MB)

Error:
   bBox_LastError ("posix")

Script Step:
   bBox Bash [ Script; $1; $2; $3; $4 ]

––––––––––

First appeared in: 0.3

Examples in demo file: 18

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

––––––––––

Execute commands using the Bash shell. This is a superset of what the bBox_Shell function does, since command line options can be supplied to the interpreter, and you can use commands and functions specific to Bash that aren’t in sh.

You can use Bash’s -s option to help send parameters directly to commands you are executing.

Watch out for character encoding issues! By default, Bash will be using “c” for its character encoding, which only handles ASCII characters. This will cause problems with any high-bit or multibyte UTF-8 characters.

This function supports container field references. macOS now defaults to using Zsh, and its version of Bash is now quite a bit behind what is on Linux, so on macOS you may want to use bBox_Zsh instead. Zsh is also available on Ubuntu, but not installed by default.

––––––––––

bBox Functions

bBox Wiki