$
) TokenExpand values as a string
The string token is used to tell murex to expand variables and subshells as a string (ie one single parameter) irrespective of the data that is stored in the string. One handy common use case is file names where traditional POSIX shells would treat spaces as a new file, whereas murex treats spaces as a printable character unless explicitly told to do otherwise.
» set: example="foo\nbar"
» out: $example
foo
bar
» out: @example
foo bar
In this example the second command is passing foo\nbar
(\n
escaped as a new line) to out
. The third command is passing an array of two values: foo
and bar
.
The string and array tokens also works for subshells
» out: ${ ja: [Mon..Fri] }
["Mon","Tue","Wed","Thu","Fri"]
» out: @{ ja: [Mon..Fri] }
Mon Tue Wed Thu Fri
The string token can also be used as a command too
» set: example="Hello World!"
» $example
Hello World!
Variables and subshells can be expanded inside double quotes, brace quotes as well as used naked. But they cannot be expanded inside single quotes.
» set: example="World!"
» out: Hello $example
Hello World!
» out: 'Hello $example'
Hello $example
» out: "Hello $example"
Hello World!
» out: %(Hello $example)
Hello World!
@
) Token: Expand values as an array%(
, )
) Tokens: Initiates or terminates a string (variables expanded)"
) Token: Initiates or terminates a string (variables expanded)'
) Token: Initiates or terminates a string (variables not expanded)~
) Token: Home directory path variable(
(brace quote): Write a string to the STDOUT without new lineja
(mkarray): A sophisticated yet simply way to build a JSON arraylet
: Evaluate a mathematical function and assign to variable (deprecated)out
: Print a string to the STDOUT with a trailing new line characterset
: Define a local variable and set it’s valueThis site's content is rebuilt automatically from murex's source code after each merge to the master
branch. Downloadable murex binaries are also built with the website.
Last built on Mon Feb 13 09:18:06 UTC 2023 against commit f339958f33995895c1d997efcdbb8408d2c8d45f8b5f934.
Current version is which has been verified against 13950 tests cases.