diff head.xml @ 0:ec66f9d90ef0 draft

initial uploaded
author bgruening
date Thu, 05 Sep 2013 04:58:21 -0400
parents
children a4ad586d1403
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head.xml	Thu Sep 05 04:58:21 2013 -0400
@@ -0,0 +1,37 @@
+<tool id="unixtools_head_tool" name="Select first" version="0.1.1">
+    <description>lines from a dataset (head)</description>
+    <requirements>
+        <requirement type="package" version="8.21">gnu_coreutils</requirement>
+    </requirements>
+    <command>
+        head --lines $complement$count '${infile}' &gt; '${outfile}'
+    </command>
+
+    <inputs>
+        <param format="txt" name="infile" type="data" label="file to cut" />
+
+        <param name="complement" type="select" label="Operation">
+            <option value="">Keep first lines</option>
+            <option value="-">Remove last lines</option>
+        </param>
+
+        <param name="count" type="integer" size="5" value="10" label="Number of lines" help="These will be kept/discarded (depending on 'operation').">
+            <sanitizer>
+                <valid initial="string.printable">
+                    <remove value="&apos;"/>
+                </valid>
+            </sanitizer>
+        </param>
+    </inputs>
+
+    <outputs>
+        <data format="input" name="outfile" metadata_source="infile"/>
+    </outputs>
+    <help>
+
+**What it does**
+
+This tool runs the **head** unix command, which discards lines from the end of a file.
+
+    </help>
+</tool>