<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: BASH Script &#8211; Blank Out CC Details</title>
	<atom:link href="http://www.adamsinfo.com/bash-script-blank-out-cc-details/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adamsinfo.com/bash-script-blank-out-cc-details/</link>
	<description>Adam Palmer MBCS CITP, Linux, PHP Programmer, MySQL Developer, Embedded Hardware, Security Consultant</description>
	<lastBuildDate>Mon, 15 Mar 2010 13:13:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jadu Saikia</title>
		<link>http://www.adamsinfo.com/bash-script-blank-out-cc-details/comment-page-1/#comment-1096</link>
		<dc:creator>Jadu Saikia</dc:creator>
		<pubDate>Mon, 07 Dec 2009 16:48:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.adamsinfo.com/?p=803#comment-1096</guid>
		<description>How about this ? 

$ echo &quot;123456789&quot; &#124; sed -r &quot;s/^(.{0})(.{5})/\1XXXXX/&quot; 

Output:
XXXXX6789

http://unstableme.blogspot.com/2008/01/substitute-character-by-position-sed.html

// Jadu</description>
		<content:encoded><![CDATA[<p>How about this ? </p>
<p>$ echo &#8220;123456789&#8243; | sed -r &#8220;s/^(.{0})(.{5})/\1XXXXX/&#8221; </p>
<p>Output:<br />
XXXXX6789</p>
<p><a href="http://unstableme.blogspot.com/2008/01/substitute-character-by-position-sed.html" rel="nofollow">http://unstableme.blogspot.com/2008/01/substitute-character-by-position-sed.html</a></p>
<p>// Jadu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carsten</title>
		<link>http://www.adamsinfo.com/bash-script-blank-out-cc-details/comment-page-1/#comment-924</link>
		<dc:creator>Carsten</dc:creator>
		<pubDate>Thu, 29 Oct 2009 14:01:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.adamsinfo.com/?p=803#comment-924</guid>
		<description>I&#039;m with Wesley here. Why iterate with (poorly performing) bash, when you can use faster Perl Regular Expressions in a single command instead?

Using perl instead of sed, you can get the regex even shorter (and it&#039;s platform-independent as sed takes different parameters on Linux and OSX for extended regular expressions).

Example here: http://pastebin.com/f12cc8612</description>
		<content:encoded><![CDATA[<p>I&#8217;m with Wesley here. Why iterate with (poorly performing) bash, when you can use faster Perl Regular Expressions in a single command instead?</p>
<p>Using perl instead of sed, you can get the regex even shorter (and it&#8217;s platform-independent as sed takes different parameters on Linux and OSX for extended regular expressions).</p>
<p>Example here: <a href="http://pastebin.com/f12cc8612" rel="nofollow">http://pastebin.com/f12cc8612</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wesley Shields</title>
		<link>http://www.adamsinfo.com/bash-script-blank-out-cc-details/comment-page-1/#comment-918</link>
		<dc:creator>Wesley Shields</dc:creator>
		<pubDate>Wed, 28 Oct 2009 13:54:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.adamsinfo.com/?p=803#comment-918</guid>
		<description>I&#039;d just do it with a regular expression...

wxs@rst wxs % cat foo
a
a111111111112222
1a11111111112222
1111111111112222
222222222223333
33333333333334444
wxs@rst wxs % sed -e &#039;s/^[0-9]\{12\}\([0-9]\{4\}\)$/XXXXXXXXXXXX\1/&#039; &lt; foo
a
a111111111112222
1a11111111112222
XXXXXXXXXXXX2222
222222222223333
33333333333334444
wxs@rst wxs %</description>
		<content:encoded><![CDATA[<p>I&#8217;d just do it with a regular expression&#8230;</p>
<p>wxs@rst wxs % cat foo<br />
a<br />
a111111111112222<br />
1a11111111112222<br />
1111111111112222<br />
222222222223333<br />
33333333333334444<br />
wxs@rst wxs % sed -e &#8217;s/^[0-9]\{12\}\([0-9]\{4\}\)$/XXXXXXXXXXXX\1/&#8217; &lt; foo<br />
a<br />
a111111111112222<br />
1a11111111112222<br />
XXXXXXXXXXXX2222<br />
222222222223333<br />
33333333333334444<br />
wxs@rst wxs %</p>
]]></content:encoded>
	</item>
</channel>
</rss>
