uwefladrich / uwefladrich/scriptengine
output redirections (> and >>) within base.command do not work
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17
- Forks
- 5
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
Hi @uwefladrich
when using output redirections (e.g. for appending text or grib messages) do not with when done with a base.command statement.
the workaround is to do the redirection inside a bash script, and call that script from a base.command statement.
e.g. from Lars
- base.command:
name: "{{experiment.src_dir}}/../scripts/utils/post_process_lpjg.sh"
and the script contains this
#!/bin/bash
infile=$1
outdir=$2
outfile=$(basename $infile)
awk '(FNR>1){print $0}' $infile >> $outdir/$outfile
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the base.command entry point and the command-execution tests, then reproduce the issue with the shown redirection examples. Done means commands declared with base.command support > and >> directly, with a regression test covering the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, yaml
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100