From d9490c2811e5e5cb548c453738bb554359e7249f Mon Sep 17 00:00:00 2001
From: Ruben Vorderman <r.h.p.vorderman@lumc.nl>
Date: Thu, 23 Jan 2020 14:22:11 +0100
Subject: [PATCH] add text to file task

---
 common.wdl | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/common.wdl b/common.wdl
index 73325bf..92fd586 100644
--- a/common.wdl
+++ b/common.wdl
@@ -158,6 +158,28 @@ task StringArrayMd5 {
     }
 }
 
+task TextToFile {
+
+    input {
+        String text
+        String outputFile = "out.txt"
+        String dockerImage = "debian@sha256:f05c05a218b7a4a5fe979045b1c8e2a9ec3524e5611ebfdd0ef5b8040f9008fa"
+    }
+
+    command <<<
+        echo $'~{text}' > ~{outputFile}
+    >>>
+
+    output {
+        File out = outputFile
+    }
+
+    runtime {
+        memory: "1G"
+        docker: dockerImage
+    }
+}
+
 task YamlToJson {
     input {
         File yaml
-- 
GitLab