Skip to content

output redirections (> and >>) within base.command do not work #126

@etiennesky

Description

@etiennesky

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions