Mercurial > repos > bgruening > text_processing
comparison awk.xml @ 4:56e80527c482 draft
Uploaded
| author | bgruening |
|---|---|
| date | Wed, 07 Jan 2015 11:10:52 -0500 |
| parents | 7068d1548234 |
| children | 8928e6d1e7ba |
comparison
equal
deleted
inserted
replaced
| 3:7068d1548234 | 4:56e80527c482 |
|---|---|
| 1 <tool id="tp_awk_tool" name="Text reformatting" version="0.1.1"> | 1 <tool id="tp_awk_tool" name="Text reformatting" version="@BASE_VERSION@.0"> |
| 2 <description>with awk</description> | 2 <description>with awk</description> |
| 3 <requirements> | 3 <macros> |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="requirements"> | |
| 4 <requirement type="package" version="4.1.0">gnu_awk</requirement> | 7 <requirement type="package" version="4.1.0">gnu_awk</requirement> |
| 5 </requirements> | 8 </expand> |
| 9 <version_command>awk --version | head -n 1</version_command> | |
| 6 <command> | 10 <command> |
| 7 awk --sandbox -v FS=\$'\t' -v OFS=\$'\t' --re-interval -f '$awk_script' '$input' > '$output' | 11 <![CDATA[ |
| 12 awk | |
| 13 --sandbox | |
| 14 -v FS=\$'\t' | |
| 15 -v OFS=\$'\t' | |
| 16 --re-interval | |
| 17 -f '$awk_script' | |
| 18 "$input" | |
| 19 > "$output" | |
| 20 ]]> | |
| 8 </command> | 21 </command> |
| 9 <inputs> | 22 <inputs> |
| 10 <param format="txt" name="input" type="data" label="File to process" /> | 23 <param format="txt" name="input" type="data" label="File to process" /> |
| 11 <param name="url_paste" type="text" area="true" size="5x35" label="AWK Program" help=""> | 24 <param name="url_paste" type="text" area="true" size="5x35" label="AWK Program" help=""> |
| 12 <sanitizer> | 25 <sanitizer> |
| 13 <valid initial="string.printable"> | 26 <valid initial="string.printable"> |
| 14 <remove value="'"/> | 27 <remove value="'"/> |
| 15 </valid> | 28 </valid> |
| 16 </sanitizer> | 29 </sanitizer> |
| 17 </param> | 30 </param> |
| 18 </inputs> | 31 </inputs> |
| 19 <tests> | 32 <configfiles> |
| 33 <configfile name="awk_script"> | |
| 34 $url_paste | |
| 35 </configfile> | |
| 36 </configfiles> | |
| 37 <outputs> | |
| 38 <data format="input" name="output" metadata_source="input"/> | |
| 39 </outputs> | |
| 40 <tests> | |
| 20 <test> | 41 <test> |
| 21 <param name="input" value="unix_awk_input1.txt" /> | 42 <param name="input" value="unix_awk_input1.txt" /> |
| 43 <param name="awk_script" value="$2>0.5 { print $2*9, $1 }" /> | |
| 22 <output name="output" file="unix_awk_output1.txt" /> | 44 <output name="output" file="unix_awk_output1.txt" /> |
| 23 <param name="FS" value="tab" /> | |
| 24 <param name="OFS" value="tab" /> | |
| 25 <param name="file_data" value="$2>0.5 { print $2*9, $1 }" /> | |
| 26 </test> | 45 </test> |
| 27 </tests> | 46 </tests> |
| 28 <outputs> | |
| 29 <data format="input" name="output" metadata_source="input"/> | |
| 30 </outputs> | |
| 31 <configfiles> | |
| 32 <configfile name="awk_script"> | |
| 33 $url_paste | |
| 34 </configfile> | |
| 35 </configfiles> | |
| 36 <help> | |
| 37 | 47 |
| 48 <help> | |
| 49 <![CDATA[ | |
| 38 **What it does** | 50 **What it does** |
| 39 | 51 |
| 40 This tool runs the unix **awk** command on the selected data file. | 52 This tool runs the unix **awk** command on the selected data file. |
| 41 | 53 |
| 42 .. class:: infomark | 54 .. class:: infomark |
| 109 - matches the beginning of a line or string. | 121 - matches the beginning of a line or string. |
| 110 - indicates negation in a character class. For example, [^...] matches every character except the ones inside brackets. | 122 - indicates negation in a character class. For example, [^...] matches every character except the ones inside brackets. |
| 111 - **$** matches the end of a line or string. | 123 - **$** matches the end of a line or string. |
| 112 - **\|** Separates alternate possibilities. | 124 - **\|** Separates alternate possibilities. |
| 113 | 125 |
| 114 | 126 @REFERENCES@ |
| 127 ]]> | |
| 115 </help> | 128 </help> |
| 116 </tool> | 129 </tool> |
