Skip to main content

Builtin Commands

Laurence MorganAbout 8 minBuiltin Commands

Builtin Commands

This section is a glossary of Murex builtin commands.

Because Murex is loosely modelled on the functional paradigm, it means all language constructs are exposed via functions and those are typically builtins because they can share the Murex runtime virtual machine. However any executable command can also be called from within Murex; be that either via the exec builtin or natively like you would from any Linux, UNIX, or even Windows command prompt.

Other Reference Material

Language Guides

  1. Language Tour, which is an introduction into the Murex language.

  2. Rosetta Stone, which is a reference table comparing Bash syntax to Murex's.

Murex's Source Code

The source for each of these builtins can be found on Githubopen in new window.

Shell Commands For Querying Builtins

From the shell itself: run builtins to list the builtin command.

If you require a manual on any of those commands, you can run murex-docs to return the same markdown-formatted document as those listed below. eg

murex-docs trypipe

Pages

Input / Output Streams

Commands for managing the flow of data between different processes and/or the terminal screen.

Filesystem Operations

Commands for working with files and/or the filesystem.

Defined by POSIX

Commands defined by POSIX.

List / Array Editing

Commands that operate against a list or array.

String Manipulation

Commands for working with strings.

Several list based tools will also work with strings. Those that can, are included in this sub-section.

Numeric / Math Tools

Commands for working with numerical data.

Structured Data Management

Commands for working with structured data such as maps, tables, arrays and other data formats that are present in documents such as CSV, JSON, YAML, TOML, Sexpr, CSV, etc.

Table Management

Commands specifically for working with tabulated data.

System Inspection

Tools to inspect the host system.

Shell / Murex Management

Commands to manage the Murex shell session.

String Escaping / Character Codes

Commands to escape special characters in various different string formats.

Process Management

Management of system processes and Murex FIDs.

Language And Scripting

Various commands that enable control flow, error handling and other important characteristics that turn Murex into a functional programming language.

Error Handling

Tools and control flow structures to handle errors.

Help and Hint Tools

Tools for providing help and hints, useful when working inside the interactive shell.

Uncategorised

  • die: Terminate murex with an exit number of 1 (deprecated)
  • let: Evaluate a mathematical function and assign to variable (deprecated)
  • murex-parser: Runs the Murex parser against a block of code

Optional Builtins

  • Inline SQL (select): Inlining SQL into shell pipelines
  • !bz2: Decompress a bz2 file
  • base64: Encode or decode a base64 string
  • gz: Compress or decompress a gzip file
  • qr: Creates a QR code from stdin
  • sleep: Suspends the shell for a number of seconds