<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MemoSoup &#187; case</title>
	<atom:link href="http://www.memosoup.com/tag/case/feed" rel="self" type="application/rss+xml" />
	<link>http://www.memosoup.com</link>
	<description>Mix of the things I always forget</description>
	<lastBuildDate>Tue, 07 Feb 2012 00:03:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Unix: rename files to lowercase</title>
		<link>http://www.memosoup.com/20110130/unix-rename-files-to-lowercase.html</link>
		<comments>http://www.memosoup.com/20110130/unix-rename-files-to-lowercase.html#comments</comments>
		<pubDate>Sun, 30 Jan 2011 14:44:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[case]]></category>
		<category><![CDATA[rename]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=331</guid>
		<description><![CDATA[<p>It&#8217;s very simple to rename the files to lowercase/uppercase using awk:</p> <p>Lowercase</p> ls -1rt &#124; awk '{ printf(&#34;mv %s %s\n&#34;, $0, tolower($0)) &#124; &#34;sh&#34; } END { close(&#34;sh&#34;) }' <p>Uppercase</p> ls -1rt &#124; awk '{ printf(&#34;mv %s %s\n&#34;, $0, toupper($0)) &#124; &#34;sh&#34; } END { close(&#34;sh&#34;) }' Tweet news and informations&#160;automotive,business,crime,health,life,politics,science,technology,travelautomotive,business,crime,health,life,politics,science,technology,travel]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s very simple to rename the files to lowercase/uppercase using awk:</p>
<p><strong>Lowercase</strong></p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-1rt</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{ printf(&quot;mv %s %s\n&quot;, $0, tolower($0)) | &quot;sh&quot; } END { close(&quot;sh&quot;) }'</span></div></div>
<p><strong>Uppercase</strong></p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-1rt</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{ printf(&quot;mv %s %s\n&quot;, $0, toupper($0)) | &quot;sh&quot; } END { close(&quot;sh&quot;) }'</span></div></div>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20110130%2Funix-rename-files-to-lowercase.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20110130/unix-rename-files-to-lowercase.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Unix: rename files to lowercase" data-url="http://www.memosoup.com/20110130/unix-rename-files-to-lowercase.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20110130/unix-rename-files-to-lowercase.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using pattern lists in Unix</title>
		<link>http://www.memosoup.com/20090912/using-pattern-lists-in-unix.html</link>
		<comments>http://www.memosoup.com/20090912/using-pattern-lists-in-unix.html#comments</comments>
		<pubDate>Sat, 12 Sep 2009 18:57:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[case]]></category>
		<category><![CDATA[regexp]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=71</guid>
		<description><![CDATA[<p>Here is the small reminder about the syntax of the &#8220;case&#8221; command and the usage of the pattern lists.</p> #!/bin/ksh print -n &#34;Please enter the line: &#34; read line case &#34;$line&#34; in &#160;?&#40;dog&#124;cat&#41; &#160;&#41; print &#34;zero or one occurrence of any pattern&#34; ;; &#160;*&#40;low&#124;high&#41; &#41; print &#34;zero or more occurrences of any pattern&#34; ;; &#160;@&#40;duncan&#124;methos&#41; [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the small reminder about the syntax of the &#8220;case&#8221; command and the usage of the pattern lists.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/ksh</span><br />
print <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Please enter the line: &quot;</span><br />
<span style="color: #c20cb9; font-weight: bold;">read</span> line<br />
<br />
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$line</span>&quot;</span> <span style="color: #000000; font-weight: bold;">in</span><br />
&nbsp;?<span style="color: #7a0874; font-weight: bold;">&#40;</span>dog<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">cat</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#41;</span> print <span style="color: #ff0000;">&quot;zero or one occurrence of any pattern&quot;</span> <span style="color: #000000; font-weight: bold;">;;</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>low<span style="color: #000000; font-weight: bold;">|</span>high<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span> print <span style="color: #ff0000;">&quot;zero or more occurrences of any pattern&quot;</span> <span style="color: #000000; font-weight: bold;">;;</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">@</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>duncan<span style="color: #000000; font-weight: bold;">|</span>methos<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span> print <span style="color: #ff0000;">&quot;exactly one occurrence of any pattern&quot;</span> <span style="color: #000000; font-weight: bold;">;;</span><br />
&nbsp;+<span style="color: #7a0874; font-weight: bold;">&#40;</span>rudolph<span style="color: #000000; font-weight: bold;">|</span>blitzen<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span> print <span style="color: #ff0000;">&quot;one or more occurrence of any pattern&quot;</span> <span style="color: #000000; font-weight: bold;">;;</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">!</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>grinch<span style="color: #000000; font-weight: bold;">|</span>babay<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span> print <span style="color: #ff0000;">&quot;everything except patterns&quot;</span> <span style="color: #000000; font-weight: bold;">;;</span><br />
&nbsp;-<span style="color: #000000; font-weight: bold;">@</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>hH?<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp;print <span style="color: #ff0000;">&quot;Some help...&quot;</span> <span style="color: #000000; font-weight: bold;">;;</span><br />
&nbsp;-v<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>erbose<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span> print <span style="color: #ff0000;">&quot;Some more words...&quot;</span> <span style="color: #000000; font-weight: bold;">;;</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> print <span style="color: #ff0000;">&quot;Something else...&quot;</span> <span style="color: #000000; font-weight: bold;">;;</span><br />
<span style="color: #000000; font-weight: bold;">esac</span></div></div>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20090912%2Fusing-pattern-lists-in-unix.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20090912/using-pattern-lists-in-unix.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Using pattern lists in Unix" data-url="http://www.memosoup.com/20090912/using-pattern-lists-in-unix.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20090912/using-pattern-lists-in-unix.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

