I have been try to write in CWL a description that appends stdout and stderr to a file in a specific directory, something like printf 'some message' >> out_directory/out_file 2>&1
With the following CWL description:
# File: test.cwl
cwlVersion: v1.0
class: CommandLineTool
requirements:
- class: InlineJavascriptRequirement
baseCommand: [printf]
inputs:
message:
type: string
inputBinding:
position: 1
output_name:
type: string
output_dir:
type: string
stdout: $(inputs.output_name)
stderr: $(inputs.output_name)
outputs:
output:
type: File
outputBinding:
glob: $(inputs.output_dir)/$(inputs.output_name)
and input file:
# File: test.yml
message: 'some message'
output_name: out_file
output_dir: out_directory
I get this error
Error collecting output for parameter 'output':
test.cwl:28:7: Did not find output file with glob pattern: '['out_directory/out_file']'
Any ideas about printing to specific directories? Also, how can I use >> instead of > ?
Thank you!
I finally managed to move the output to a specific directory by following the answer here