CommandsPipeline type

Undocumented

Methods

$()(cp:CommandsPipeline) Source: stdlib.ngs:5102
Run external processes described by the commands pipeline. Waits for the commands to finish unless "&" is specified.

Automatically called by NGS for syntax

$(my_prog) , $(some | programs)

Returns

Process

Example

if $(test -f /myfile) { ... }
# or
p = $(node main.js serve &)
YOUR_TESTS_OF_NODE_SERVER_HERE
p.kill()
%()(cp:CommandsPipeline) Source: stdlib.ngs:5332
Returns cp, wihout any processing. Convenient way to pass ready-to-run Command as an argument

Automatically called by NGS for syntax

%(my_command) , %(my_command | my_other_command)

Example

F run_when_needed(cp:CommandsPipeline) { ... $(cp) ... }
...
run_when_needed(%(ls >/tmp/my_ls))
``(cp:CommandsPipeline) Source: stdlib.ngs:5225
Get command standard output. Similar to bash. Does not strip trailing new line character(s) `line:true my_command` will return the first line, stripping trailing new line character(s)

Automatically called by NGS for syntax

`my_command` , `my_command | my_other_command`
````(cp:CommandsPipeline) Source: stdlib.ngs:5243
Get command standard output and decode() it.

Automatically called by NGS for syntax

``my_command`` , ``my_command | my_other_command``

Returns

structured data when the output can be parsed.

Example

``aws ec2 describe-instances`` is Arr  # true
``aws ec2 describe-instances``.InstanceId.map(X[0..3]).join(",")  # i-3, i-9, i-8, i-a, i-7, ...
init(pp:ProcessesPipeline, cp:CommandsPipeline) Source: stdlib.ngs:4321
Undocumented
inspect(cp:CommandsPipeline) Source: stdlib.ngs:6052
Inspect CommandsPipeline

Returns

Lines
run(r:AWS::Res, log_pfx:Str, cp:CommandsPipeline, do_decode:Any=true)internal Source: autoload/AWS.ngs:120
Run a command. Internal method. Please do not use outside the AWS library.
run(rd:AWS::ResDef, log_pfx:Str, cp:CommandsPipeline, do_decode:Any=true)internal Source: autoload/AWS.ngs:190
Run an external command related to the resource definition. Will not run the command if rd.dry_run is true.

Parameters

do_decodeWhether to decode the output

Returns

Either parsed output or finished CommandsPipeline (processes in CommandsPipeline finished)
run(r:AWS2::Res, log_pfx:Str, cp:CommandsPipeline, do_decode:Any=true)internal Source: autoload/AWS2.ngs:129
Run a command. Internal method. Please do not use outside the AWS library.
run(rd:AWS2::ResDef, log_pfx:Str, cp:CommandsPipeline, do_decode:Any=true)internal Source: autoload/AWS2.ngs:194
Run an external command related to the resource definition. Will not run the command if rd.dry_run is true.

Parameters

do_decodeWhether to decode the output

Returns

Either parsed output or finished CommandsPipeline (processes in CommandsPipeline finished)