Mercurial > repos > bgruening > text_processing
diff awk.xml @ 6:8928e6d1e7ba draft
Uploaded
| author | bgruening |
|---|---|
| date | Thu, 08 Jan 2015 09:07:31 -0500 |
| parents | 56e80527c482 |
| children | d64eace4f9f3 |
line wrap: on
line diff
--- a/awk.xml Wed Jan 07 11:15:41 2015 -0500 +++ b/awk.xml Thu Jan 08 09:07:31 2015 -0500 @@ -11,17 +11,17 @@ <![CDATA[ awk --sandbox - -v FS=\$'\t' - -v OFS=\$'\t' + -v FS=' ' + -v OFS=' ' --re-interval - -f '$awk_script' - "$input" - > "$output" + -f "$awk_script" + "$infile" + > "$outfile" ]]> </command> <inputs> - <param format="txt" name="input" type="data" label="File to process" /> - <param name="url_paste" type="text" area="true" size="5x35" label="AWK Program" help=""> + <param name="infile" format="txt" type="data" label="File to process" /> + <param name="code" type="text" area="true" size="5x35" label="AWK Program" help=""> <sanitizer> <valid initial="string.printable"> <remove value="'"/> @@ -30,21 +30,19 @@ </param> </inputs> <configfiles> - <configfile name="awk_script"> - $url_paste - </configfile> + <configfile name="awk_script">$code</configfile> </configfiles> <outputs> - <data format="input" name="output" metadata_source="input"/> + <data name="outfile" format_source="infile" metadata_source="infile"/> </outputs> <tests> - <test> - <param name="input" value="unix_awk_input1.txt" /> - <param name="awk_script" value="$2>0.5 { print $2*9, $1 }" /> - <output name="output" file="unix_awk_output1.txt" /> - </test> + <test> + <param name="infile" value="awk1.txt" /> + <!-- commas are not allowed in a value field. Values with comma will be splitted --> + <param name="code" value='$2>0.5 { print $2*9"\t"$1 }' /> + <output name="outfile" file="awk_results1.txt" /> + </test> </tests> - <help> <