Most viewed recipes tagged "sed"http://code.activestate.com/recipes/tags/sed/views/2011-07-29T13:22:54-07:00ActiveState Code RecipesFlatten XML to XPath syntax lines (Python) 2011-01-19T16:05:24-08:00Raphaël Jolivethttp://code.activestate.com/recipes/users/4135673/http://code.activestate.com/recipes/577547-flatten-xml-to-xpath-syntax-lines/ <p style="color: grey"> Python recipe 577547 by <a href="/recipes/users/4135673/">Raphaël Jolivet</a> (<a href="/recipes/tags/flatten/">flatten</a>, <a href="/recipes/tags/grep/">grep</a>, <a href="/recipes/tags/sed/">sed</a>, <a href="/recipes/tags/xml/">xml</a>, <a href="/recipes/tags/xpath/">xpath</a>). </p> <p>This script acts like <a href="http://www.ofb.net/~egnor/xml2/">xml2</a>. It transforms a XML file into a flat text output, with <em>XPath</em>-like syntax, one line per XML node or attribute. This format is more suitable for working with standard unix CLI utils (sed, grep, ... etc).</p> Pyliner - Script to run arbitrary Python code on the command line (Python) 2011-07-29T13:22:54-07:00Drew Gulinohttp://code.activestate.com/recipes/users/4119417/http://code.activestate.com/recipes/577075-pyliner-script-to-run-arbitrary-python-code-on-the/ <p style="color: grey"> Python recipe 577075 by <a href="/recipes/users/4119417/">Drew Gulino</a> (<a href="/recipes/tags/awk/">awk</a>, <a href="/recipes/tags/oneliner/">oneliner</a>, <a href="/recipes/tags/perl/">perl</a>, <a href="/recipes/tags/pipe/">pipe</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/sed/">sed</a>, <a href="/recipes/tags/sysadmin/">sysadmin</a>). </p> <p>A Python script that runs arbitrary Python scripts in an input loop. This allows one-liner Python scripts similarly to how Perl runs them (-l,-a,-n,-F, BEGIN, END)</p> <p>It provides additional syntax that allows multiline Python scripts to be run on a single line</p> hexadecimal CSS colors, convert the six-digit to the three-digit notation (Bash) 2010-10-02T14:07:23-07:00Romain Dartigueshttp://code.activestate.com/recipes/users/4167472/http://code.activestate.com/recipes/577416-hexadecimal-css-colors-convert-the-six-digit-to-th/ <p style="color: grey"> Bash recipe 577416 by <a href="/recipes/users/4167472/">Romain Dartigues</a> (<a href="/recipes/tags/color/">color</a>, <a href="/recipes/tags/css/">css</a>, <a href="/recipes/tags/regex/">regex</a>, <a href="/recipes/tags/rgb/">rgb</a>, <a href="/recipes/tags/sed/">sed</a>, <a href="/recipes/tags/shortening/">shortening</a>). </p> <p>Want to replace all six-digit RGB notation (#rrggbb) to the short (three-digit #rgb) form? Or the opposite?</p>