LoginSignup
2
0

More than 5 years have passed since last update.

CWL User Guide 5: Capturing Standard Output をやってみた

Last updated at Posted at 2017-12-04

CWL User Guide 5: Capturing Standard Output

Common Workflow Language User Guide: Capturing Standard Output

今回は標準出力を、ファイルに書き込む例が書かれています

この回にでてくる主なキーワード

  • stdout
  • type: stdout

CWLファイル、

stdout.cwl
#!/usr/bin/env cwl-runner

cwlVersion: v1.0
class: CommandLineTool
baseCommand: echo
stdout: output.txt
inputs:
  message:
    type: string
    inputBinding:
      position: 1
outputs:
  output:
    type: stdout

パラメータファイル

echo-job.yml
message: Hello world!

実行

実行方法

cwltool stdout.cwl echo-job.yml

実行結果

$ cwltool stdout.cwl echo-job.yml
/usr/local/bin/cwltool 1.0.20171107133715
Resolved 'stdout.cwl' to 'file:///home/vagrant/cwl_user_guide_work/05-stdout/stdout.cwl'
[job stdout.cwl] /tmp/tmpP1A7UY$ echo \
    'Hello world!' > /tmp/tmpP1A7UY/output.txt
[job stdout.cwl] completed success
{
    "output": {
        "checksum": "sha1$47a013e660d408619d894b20806b1d5086aab03b",
        "basename": "output.txt",
        "location": "file:///home/vagrant/cwl_user_guide_work/05-stdout/output.txt",
        "path": "/home/vagrant/cwl_user_guide_work/05-stdout/output.txt",
        "class": "File",
        "size": 13
    }
}
Final process status is success

実行結果確認

$ cat output.txt
Hello world!

今回使ったファイル

cwl_user_guide_work/05-stdout at master · manabuishii/cwl_user_guide_work

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0