Templating for ShellTask commands
See original GitHub issueOpening for discussion; we could go for a full-fledge solution like Jinja, or we could do something simple like:
echo !param
and replace all instances of !string
with a parameter value (either taken from context or from an actual Parameter
). The exclamation point should be a safe character to rely on.
I’m not really sure how heavily people will use templating, and how intricate their use cases will be.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Shell Tasks | Prefect Docs
Task for running arbitrary shell commands. NOTE: This task combines stderr and stdout because reading from both streams without blocking is tricky.
Read more >Templating with Linux in a Shell Script? - Server Fault
Bash-TPL lets you you mark up textual files (config files, yaml, xml, scripts, html, etc) with shell commands and variable replacements, while ...
Read more >BashOperator — Airflow Documentation
Use the BashOperator to execute commands in a Bash shell. ... You can use Jinja templates to parameterize the bash_command argument.
Read more >gulp-shell - npm
shell(commands, options) or shell.task(commands, options). commands. type: Array or String. A command can be a template which can be ...
Read more >ansible shell task erroring out without proper message
I am trying to verify if sdd exists in mount command output. so when ... The error was: template error while templating string:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s actual bash syntax though; I don’t want to be manipulating valid syntax --> that could lead to unexpected and hard to debug situations.
Gut reaction: templating is broadly useful beyond bash (SQL, helm, etc) so we should have comfort that we have a general solution.