Previous changeset 8:4c752559b236 (2017-07-12) Next changeset 10:e39fceb6ab85 (2018-02-20) |
Commit message:
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 5d3a6a822897569f22f288589543562f54482418 |
modified:
replace_text_in_line.xml |
b |
diff -r 4c752559b236 -r 6378f8384f30 replace_text_in_line.xml --- a/replace_text_in_line.xml Wed Jul 12 14:07:57 2017 -0400 +++ b/replace_text_in_line.xml Fri Dec 01 13:47:28 2017 -0500 |
[ |
@@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> <tool id="tp_replace_in_line" name="Replace Text" version="@BASE_VERSION@.0"> <description>in entire line</description> <macros> @@ -8,13 +9,25 @@ </requirements> <version_command>sed --version | head -n 1</version_command> <command> + <!-- + This looks quite strange but it is intentional. We have used U+0090 as + the replacement brackets in the sed expression. This meets multiple requirements for use: + + - is legal entity in XML 1.0 (https://en.wikipedia.org/wiki/Valid_characters_in_XML) + - is legal as a sed delimiter character (must be single-byte) + - is not in string.printable + + Thus, this should execute properly. Additionally it allows users to + use characters like '/' and '\' and '|' in their regex without them + being able to prematurely terminate the expression. + --> <![CDATA[ sed -r --sandbox - "s/$find_pattern/$replace_pattern/g" - "$infile" - > "$outfile" + 's$find_pattern$replace_patterng' + '$infile' + > '$outfile' ]]> </command> <inputs> |