Changes

Jump to navigation Jump to search
51 bytes added ,  16:19, 27 February 2020
no edit summary
* {{Code|proc:system('date')}} returns the current date on a Linux system.
* Analyses the given input and counts the number of lines, words and characters (provided that {{Code|wc}} is available on the system):
<pre classsyntaxhighlight lang="brush:xquery">
proc:system(
'wc', (),
map { 'input': 'A B' || out:nl() || 'C' }
)
</presyntaxhighlight>
* The following example returns “Command not found” (unless {{Code|xyz}} is a valid command on the system):
<pre classsyntaxhighlight lang="brush:xquery">
try {
proc:system('xyz')
'Command not found: ' || $err:description
}
</presyntaxhighlight>
|}
* Instead of the {{Code|proc:code....}} error, the error message will be assigned to the returned element (no process code will be returned).
The result has the following structure:
<pre classsyntaxhighlight lang="brush:xml">
<result>
<output>...output...</output>
<code>...process code...</code>
</result>
</presyntaxhighlight>
|-
|'''Errors'''
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu