mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
doc: fix docs for system/exec() (#1071)
Co-authored-by: Matthew Forrester <matthew.forrester@speechmarks.com>
This commit is contained in:
parent
17420e9594
commit
e55efbbfad
1 changed files with 2 additions and 2 deletions
|
|
@ -1934,14 +1934,14 @@ either case it should return a boolean.`,
|
|||
help: `'$output = exec(
|
||||
"command",
|
||||
["arg1", "arg2"],
|
||||
{"env": ["ENV_VAR=ENV_VALUE"],
|
||||
{"env": ["ENV_VAR=ENV_VALUE", "ENV_VAR2=ENV_VALUE2"],
|
||||
"dir": "/tmp/run_command_here",
|
||||
"stdin_string": "this is input fed to program",
|
||||
"combined_output": true
|
||||
)'
|
||||
Run a command via executable, path, args and environment, yielding its stdout minus final carriage return.`,
|
||||
examples: []string{
|
||||
`exec("echo", ["Hello", "$YOUR_NAME"], {"env": "YOUR_NAME=World"}) outputs "Hello World"`,
|
||||
`exec("echo", ["I don't do", "$SHELL things"], {"env": "SHELL=sh"}) outputs "I don't do $SHELL things"`,
|
||||
},
|
||||
variadicFunc: bifs.BIF_exec,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue