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.
In murex's source under the lang/builtins
path of the project files is several directories, each hosting different categories of murex builtins. From core commands through to data-types and methods.
Each package will include a README.html file with a basic summary of what that package is used for and all you to enable or disable builtins, should you decide to compile the shell from source.
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
!
(not): Reads the STDIN and exit number from previous process and not's it's condition(
(brace quote): Write a string to the STDOUT without new line2darray
: Create a 2D JSON array from multiple input sources<>
(murex named pipe): Reads from a murex named pipe<stdin>
: Read the STDIN belonging to the parent code block=
(arithmetic evaluation): Evaluate a mathematical function>>
(append file): Writes STDIN to disk - appending contents if file already exists>
(truncate file): Writes STDIN to disk - overwriting contents if file already exists@[
(range): Outputs a ranged subset of data from STDIN[[
(element): Outputs an element from a nested structure[
(index): Outputs an element from an array, map or tablea
(mkarray): A sophisticated yet simple way to build an array or listalias
: Create an alias for a commandalter
: Change a value within a structured data-type and pass that change along the pipeline without altering the original source inputand
: Returns true
or false
depending on whether multiple conditions are metappend
: Add data to the end of an arrayautocomplete
: Set definitions for tab-completion in the command linebg
: Run processes in the backgroundcast
: Alters the data type of the previous function without altering it's outputcatch
: Handles the exception code raised by try
or trypipe
cd
: Change (working) directoryconfig
: Query or define murex runtime settingscpuarch
: Output the hosts CPU architecturecpucount
: Output the number of CPU cores available on your hostdebug
: Debugging informationdie
: Terminate murex with an exit number of 1err
: Print a line to the STDERRescape
: Escape or unescapes inputesccli
: Escapes an array so output is valid shell codeeschtml
: Encode or decodes text for HTMLescurl
: Encode or decodes text for the URLevent
: Event driven programming for shell scriptsexec
: Runs an executableexit
: Exit murexexitnum
: Output the exit number of the previous processexport
: Define a local variable and set it's valuef
: Lists objects (eg files) in the current working directoryfalse
: Returns a false
valuefexec
: Execute a command or function, bypassing the usual order of precedence.fg
: Sends a background process into the foregroundfid-kill
: Terminate a running murex functionfid-killall
: Terminate all running murex functionsfid-list
: Lists all running functions within the current murex sessionfor
: A more familiar iteration loop to existing developersforeach
: Iterate through an arrayformat
: Reformat one data-type into another data-typefunction
: Define a function blockg
: Glob pattern matching for file system objects (eg *.txt)get-type
: Returns the data-type of a variable or pipeget
: Makes a standard HTTP request and returns the result as a JSON objectgetfile
: Makes a standard HTTP request and return the contents as murex-aware data type for passing along murex pipelines.global
: Define a global variable and set it's valuehistory
: Outputs murex's command historyif
: Conditional statement to execute different blocks of code depending on the result of the conditionja
: A sophisticated yet simply way to build a JSON arrayjsplit
: Splits STDIN into a JSON array based on a regex parameterleft
: Left substring every item in a listlen
: Outputs the length of an arraylet
: Evaluate a mathematical function and assign to variablelockfile
: Create and manage lock filesman-summary
: Outputs a man page summary of a commandmap
: Creates a map from two data sourcesmatch
: Match an exact value in an arraymsort
: Sorts an array - data type agnosticmtac
: Reverse the order of an arraymurex-docs
: Displays the man pages for murex builtinsmurex-package
: murex's package managermurex-parser
: Runs the murex parser against a block of codemurex-update-exe-list
: Forces murex to rescan $PATH looking for exectablesnull
: null function. Similar to /dev/nullopen-image
: Renders bitmap image data on your terminalor
: Returns true
or false
depending on whether one code-block out of multiple ones supplied is successful or unsuccessful.os
: Output the auto-detected OS nameout
: Print a string to the STDOUT with a trailing new line characterpipe
: Manage murex named pipespost
: HTTP POST request with a JSON-parsable returnprefix
: Prefix a string to every item in a listprepend
: Add data to the start of an arraypretty
: Prettifies JSON to make it human readableprivate
: Define a private function blockpt
: Pipe telemetry. Writes data-types and bytes writtenrand
: Random field generatorread
: read
a line of input from the user and store as a variableregexp
: Regexp tools for arrays / lists of stringsright
: Right substring every item in a listruntime
: Returns runtime information on the internal state of murexrx
: Regexp pattern matching for file system objects (eg '.*.txt')set
: Define a local variable and set it's valuesource
: Import murex code from another file of code blockstruct-keys
: Outputs all the keys in a structure as a file pathsuffix
: Prefix a string to every item in a listsummary
: Defines a summary help text for a commandswitch
: Blocks of cascading conditionalsswivel-datatype
: Converts tabulated data into a map of values for serialised data-types such as JSON and YAMLswivel-table
: Rotates a table by 90 degreesta
: A sophisticated yet simple way to build an array of a user defined data-typetest
: murex's test framework - define tests, run tests and debug shell scriptstime
: Returns the execution run time of a command or blocktmp
: Create a temporary file and write to ittout
: Print a string to the STDOUT and set it's data-typetread
: read
a line of input from the user and store as a user defined typed variabletrue
: Returns a true
valuetry
: Handles errors inside a block of codetrypipe
: Checks state of each function in a pipeline and exits block on errorversion
: Get murex versionwhile
: Loop until condition false