<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/bash/tags/sed</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sun, 26 May 2013 12:22:10 GMT</pubDate>
<item>
<title>(Bash) sed replace in Mac OS X - ef</title>
<link>http://snipplr.com/view/69891/sed-replace-in-mac-os-x/</link>
<description><![CDATA[ <p>Replaces string 'sth' with 'sth-new' in all files in current directory.</p> ]]></description>
<pubDate>Tue, 12 Feb 2013 03:02:54 GMT</pubDate>
<guid>http://snipplr.com/view/69891/sed-replace-in-mac-os-x/</guid>
</item>
<item>
<title>(Bash) Remove malicious code injection from .php files - tinytiger</title>
<link>http://snipplr.com/view/68662/remove-malicious-code-injection-from-php-files/</link>
<description><![CDATA[ <p>Using sed to recursively remove malicious code injection form .php files when the injected code follows the pattern </p> ]]></description>
<pubDate>Tue, 20 Nov 2012 23:00:17 GMT</pubDate>
<guid>http://snipplr.com/view/68662/remove-malicious-code-injection-from-php-files/</guid>
</item>
<item>
<title>(Bash) Remote sed editing multiple hosts: How to quote - bubnoff</title>
<link>http://snipplr.com/view/58962/remote-sed-editing-multiple-hosts-how-to-quote/</link>
<description><![CDATA[ <p>Here's a quick one-off trick for sed editing conf files on remote hosts. I will
post the core sed command first, showing the crazy quoting, then a for loop demonstrating how one might tackle multiple hosts. Took me a few tries to get the quoting so thought I'd save others the trouble.  

In this example I had to change the homepage variable in a remote conf file. 

* The URL needs single quotes in the conf file. '\'' does the trick.
* The End of Line metacharacter '$' needs to be escaped for bash. Like so, \$.
* Finally, note that the sed expression is wrapped in single quotes while the whole command is wrapped with double quotes. I tried other combos -- if you know why this is so, do tell.</p> ]]></description>
<pubDate>Thu, 22 Sep 2011 04:41:55 GMT</pubDate>
<guid>http://snipplr.com/view/58962/remote-sed-editing-multiple-hosts-how-to-quote/</guid>
</item>
<item>
<title>(Bash) Sed and Awk CSV Address Prep - johnattebury</title>
<link>http://snipplr.com/view/55772/sed-and-awk-csv-address-prep/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 27 Jun 2011 16:23:54 GMT</pubDate>
<guid>http://snipplr.com/view/55772/sed-and-awk-csv-address-prep/</guid>
</item>
<item>
<title>(Bash) sed examples - mahome</title>
<link>http://snipplr.com/view/54832/sed-examples/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 03 Jun 2011 19:02:19 GMT</pubDate>
<guid>http://snipplr.com/view/54832/sed-examples/</guid>
</item>
<item>
<title>(Bash) Delete blank lines with sed - bubnoff</title>
<link>http://snipplr.com/view/53325/delete-blank-lines-with-sed/</link>
<description><![CDATA[ <p>Find any line with beginning of line followed by zero or more tabs, spaces followed by end of line -- delete it.</p> ]]></description>
<pubDate>Wed, 11 May 2011 05:39:57 GMT</pubDate>
<guid>http://snipplr.com/view/53325/delete-blank-lines-with-sed/</guid>
</item>
<item>
<title>(Bash) Merge lines with SED. - bubnoff</title>
<link>http://snipplr.com/view/53323/merge-lines-with-sed/</link>
<description><![CDATA[ <p>Merge line below to current line. 

"This one-liner joins two consecutive lines with the "N" command. They get joined with a "\n" character between them. The substitute command replaces this newline with a space, thus joining every pair of lines with a whitespace."

From catonmat here:

http://www.catonmat.net/blog/sed-one-liners-explained-part-one/</p> ]]></description>
<pubDate>Wed, 11 May 2011 05:16:19 GMT</pubDate>
<guid>http://snipplr.com/view/53323/merge-lines-with-sed/</guid>
</item>
<item>
<title>(Bash) CSV to TSV with sed - jeremydouglass</title>
<link>http://snipplr.com/view/52548/csv-to-tsv-with-sed/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 25 Apr 2011 04:19:51 GMT</pubDate>
<guid>http://snipplr.com/view/52548/csv-to-tsv-with-sed/</guid>
</item>
<item>
<title>(Bash) Linux shell replace string - Risse</title>
<link>http://snipplr.com/view/51149/linux-shell-replace-string/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 26 Mar 2011 06:52:40 GMT</pubDate>
<guid>http://snipplr.com/view/51149/linux-shell-replace-string/</guid>
</item>
<item>
<title>(Bash) Find and Replace with Sed - lamebollock</title>
<link>http://snipplr.com/view/45593/find-and-replace-with-sed/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 11 Dec 2010 05:02:13 GMT</pubDate>
<guid>http://snipplr.com/view/45593/find-and-replace-with-sed/</guid>
</item>
<item>
<title>(Bash) Find and replace with sed - bionic</title>
<link>http://snipplr.com/view/45254/find-and-replace-with-sed/</link>
<description><![CDATA[ <p>From the referenced website:
Well, that command speaks for itself "sed" edits "-i in place ( on the spot ) and replaces the word "ugly with "beautiful" in the file "/home/bruno/old-friends/sue.txt"</p> ]]></description>
<pubDate>Sat, 04 Dec 2010 03:49:38 GMT</pubDate>
<guid>http://snipplr.com/view/45254/find-and-replace-with-sed/</guid>
</item>
<item>
<title>(Bash) SED find and replace xml - moonbather</title>
<link>http://snipplr.com/view/44545/sed-find-and-replace-xml/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 21 Nov 2010 07:32:45 GMT</pubDate>
<guid>http://snipplr.com/view/44545/sed-find-and-replace-xml/</guid>
</item>
<item>
<title>(Bash) find and replace string recursively - edeustace</title>
<link>http://snipplr.com/view/42910/find-and-replace-string-recursively/</link>
<description><![CDATA[ <p>From:
http://stackoverflow.com/questions/1169927/using-sed-and-grep-to-search-and-replace</p> ]]></description>
<pubDate>Mon, 25 Oct 2010 22:12:46 GMT</pubDate>
<guid>http://snipplr.com/view/42910/find-and-replace-string-recursively/</guid>
</item>
<item>
<title>(Bash) Vi find and replace in - moonbather</title>
<link>http://snipplr.com/view/41258/vi-find-and-replace-in/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 01 Oct 2010 21:40:43 GMT</pubDate>
<guid>http://snipplr.com/view/41258/vi-find-and-replace-in/</guid>
</item>
<item>
<title>(Bash) Git pre-commit hook to fix trailing whitespace - Mikelifeguard</title>
<link>http://snipplr.com/view/28523/git-precommit-hook-to-fix-trailing-whitespace/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 17 Feb 2010 23:40:01 GMT</pubDate>
<guid>http://snipplr.com/view/28523/git-precommit-hook-to-fix-trailing-whitespace/</guid>
</item>
<item>
<title>(Bash) Commandline oneliner to get your public IP adress - berkes</title>
<link>http://snipplr.com/view/27675/commandline-oneliner-to-get-your-public-ip-adress/</link>
<description><![CDATA[ <p>Use wget and sed to get your public IP adress (instead of firing up firefox and visting whatismyip.com). Usefull in scripts where you need your public IP adres.

There are probably better ways, maybe even a GNUtool that I missed?</p> ]]></description>
<pubDate>Thu, 04 Feb 2010 05:58:52 GMT</pubDate>
<guid>http://snipplr.com/view/27675/commandline-oneliner-to-get-your-public-ip-adress/</guid>
</item>
<item>
<title>(Bash) print a list of bookmarks on delicous in a certain tag. - berkes</title>
<link>http://snipplr.com/view/27440/print-a-list-of-bookmarks-on-delicous-in-a-certain-tag/</link>
<description><![CDATA[ <p>Simple wget - grep - sed pipe to print a list of bookmarks on delicous in a certain tag.
Replace {USERNAME} with your username. 
Replace {TAG} with the tag you want a list of urls for.</p> ]]></description>
<pubDate>Sun, 31 Jan 2010 15:59:52 GMT</pubDate>
<guid>http://snipplr.com/view/27440/print-a-list-of-bookmarks-on-delicous-in-a-certain-tag/</guid>
</item>
<item>
<title>(Bash) Replace a string throughout a file - r0b0tnic</title>
<link>http://snipplr.com/view/26094/replace-a-string-throughout-a-file/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 07 Jan 2010 15:48:08 GMT</pubDate>
<guid>http://snipplr.com/view/26094/replace-a-string-throughout-a-file/</guid>
</item>
<item>
<title>(Bash) Print just a single line of a file - r0b0tnic</title>
<link>http://snipplr.com/view/26093/print-just-a-single-line-of-a-file/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 07 Jan 2010 15:46:25 GMT</pubDate>
<guid>http://snipplr.com/view/26093/print-just-a-single-line-of-a-file/</guid>
</item>
<item>
<title>(Bash) Display a range of lines in a specified file - blackthorne</title>
<link>http://snipplr.com/view/24557/display-a-range-of-lines-in-a-specified-file/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 10 Dec 2009 08:45:01 GMT</pubDate>
<guid>http://snipplr.com/view/24557/display-a-range-of-lines-in-a-specified-file/</guid>
</item>
</channel>
</rss>