Handy one-liners for SED

2010-09-14 0 min read Bash Linux
\"A
Image via Wikipedia

Here are some links to sed one liners, pretty useful if you want to use the power of sed.

<a href="http://www.freearchive.org/o/dd1ebea77f64bdef5982d50e868990202b0bf6f21b42e26ebb0ab1011d6ce546">http://www.freearchive.org/o/dd1ebea77f64bdef5982d50e868990202b0bf6f21b42e26ebb0ab1011d6ce546

<a href="http://www.unixguide.net/unix/sedoneliner.shtml">http://www.unixguide.net/unix/sedoneliner.shtml
<a href="http://sed.sourceforge.net/sed1line.txt">http://sed.sourceforge.net/sed1line.txt <a href="http://www.thegeekstuff.com/2010/06/bash-array-tutorial/">

<a href="http://www.thegeekstuff.com/2010/06/bash-array-tutorial/">http://www.thegeekstuff.com/2010/06/bash-array-tutorial/<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://www.ibm.com/developerworks/linux/library/l-sed1.html">imabonehead: Common threads: Sed by example, Part 1 (ibm.com) <li class="zemanta-article-ul-li"><a href="http://www.thegeekstuff.com/2009/11/unix-sed-tutorial-append-insert-replace-and-count-file-lines/">imabonehead: Unix Sed Tutorial: Append, Insert, Replace, and Count File Lines (thegeekstuff.com) <div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=be4d9a3b-c27c-46eb-8b76-2a1aa1900a4e" alt="Enhanced by Zemanta" /><span class="zem-script more-related pretty-attribution">

Continue reading

Recursive Regular Expressions

2010-03-24 2 min read Bash Fedora Linux

<img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/yo-dawg-regex.jpg" alt="Yo dawg, I heard you liked regular expressions, so I put a regex in your regex so you can match while you match!" align="bottom" /> The <a class="zem_slink freebase/en/regular_expression" title="Regular expression" rel="wikipedia" href="http://en.wikipedia.org/wiki/Regular_expression">regular expressions we use in our daily lives are actually not that “regular.” Most of the languages support some kind of extended regular expressions that are computationally more powerful than the “<a href="http://en.wikipedia.org/wiki/Regular_expression">regular” regular expressions as defined by the <a href="http://en.wikipedia.org/wiki/Formal_language">formal language theory.

Continue reading