Save CURL output to file
1
0
Entering edit mode
5.3 years ago
amnoyman • 0

Hey! I'm new to WCL I'm trying to build new workflow that send curl command and save the output to file. Didn't succeeded any.

Can someone help me?

cwl • 2.4k views
ADD COMMENT
0
Entering edit mode

I will go ahead and add cwl tag to this post since that is what you are asking about. That tag is needed for cwl developers to notice this question. If this is not the case please let us know.

ADD REPLY
2
Entering edit mode
5.3 years ago
inutano ▴ 30

You can redirect the standard output of the command by using stdout keyword like below:

cwlVersion: v1.0
class: CommandLineTool
baseCommand: curl
arguments:
  - -L
inputs:
  url:
    type: string
    inputBinding:
      position: 1
outputs:
  type: stdout
stdout: out.txt

See the stdout section of the official CWL user guide here: https://www.commonwl.org/user_guide/05-stdout/index.html I recommend you to try the user guide from the first to the end, it's the best way to start writing CWL.

Alternatively, you can use the option -o to specify the file to write the output like this: https://github.com/suecharo/test-workflow/blob/master/tool/curl.cwl

ADD COMMENT

Login before adding your answer.

Traffic: 1107 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6