Mercurial > repos > bgruening > sed_wrapper
view sed.xml @ 0:8ae62a63e93d draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sed commit cfb00484086246d51865572f004e3140b8bf4852
author | bgruening |
---|---|
date | Wed, 09 Nov 2016 14:50:45 -0500 |
parents | |
children |
line wrap: on
line source
<tool id="sed_stream_editor" name="Manipulation" version="0.0.1"> <description>utility that parses and transforms text using regular expressions (sed)</description> <command> <![CDATA[ sed -r '$pattern' $input > $outfile ]]> </command> <inputs> <param format="txt, tabular" name="input" type="data" label="Replace lines from"/> <param name="pattern" type="text" value="" label="the pattern" help="here you can enter your sed expression (No syntax check or sanitising!)" /> </inputs> <outputs> <data format="input" name="outfile" metadata_source="input"/> </outputs> <options sanitize="False"/> <requirements> <requirement type="binary">sed</requirement> </requirements> <tests> </tests> <help> <![CDATA[ .. class:: warningmark Use with caution! Its a plain wrapper around **sed** and the input is not sanitized. ----- **What it does** Changes every line of a text file according to a given regular expression. ----- **Syntax** Use the **sed**-syntax -> **s/find-pattern/replace-pattern/** **Example** - **s/x/-/** Replace all **x** with **-**. - **s/_.*//** Splits a string after **_** and replaces the rest with nothing. - **s/[^_]*_*//** Splits a string after **_** and replaces the first part with nothing. - **s/\\s.*//** Splits a string after whitespaces and replaces the rest with nothing. - **s/\\S*\\s*//** Splits a string after whitespaces and replaces the first part with nothing. ]]> </help> </tool>