question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Templating for ShellTask commands

See original GitHub issue

Opening 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.

cc: @jlowin @joshmeek

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cicdwcommented, Sep 10, 2018

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.

1reaction
jlowincommented, Sep 10, 2018

Gut reaction: templating is broadly useful beyond bash (SQL, helm, etc) so we should have comfort that we have a general solution.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found