<?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 shell script to convert string from lower to upper case and vice versa</title>
	<atom:link href="http://www.techpulp.com/blog/2008/12/bash-shell-script-to-convert-string-from-lower-to-upper-case-and-vice-versa/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.techpulp.com/blog/2008/12/bash-shell-script-to-convert-string-from-lower-to-upper-case-and-vice-versa/</link>
	<description>The pulp of technology</description>
	<lastBuildDate>Mon, 30 Jan 2012 07:42:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Sara Mithal</title>
		<link>http://www.techpulp.com/blog/2008/12/bash-shell-script-to-convert-string-from-lower-to-upper-case-and-vice-versa/#comment-95</link>
		<dc:creator>Sara Mithal</dc:creator>
		<pubDate>Sat, 18 Dec 2010 06:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://techpulp.com/?p=328#comment-95</guid>
		<description>The following command helps in converting all contents of a file from lower case to upper case.

bash# tr &#039;[:lower:]&#039; &#039;[:upper:]&#039;  output.txt


bash# tr &#039;[:upper:]&#039; &#039;[:lower:]&#039;  output.txt</description>
		<content:encoded><![CDATA[<p>The following command helps in converting all contents of a file from lower case to upper case.</p>
<p>bash# tr &#8216;[:lower:]&#8216; &#8216;[:upper:]&#8216;  output.txt</p>
<p>bash# tr &#8216;[:upper:]&#8216; &#8216;[:lower:]&#8216;  output.txt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sara Mithal</title>
		<link>http://www.techpulp.com/blog/2008/12/bash-shell-script-to-convert-string-from-lower-to-upper-case-and-vice-versa/#comment-94</link>
		<dc:creator>Sara Mithal</dc:creator>
		<pubDate>Sat, 18 Dec 2010 06:02:23 +0000</pubDate>
		<guid isPermaLink="false">http://techpulp.com/?p=328#comment-94</guid>
		<description>The same can be represented in this way as well.

Lower case to Upper case:

bash# toUpper() { echo $1 &#124; tr “[a-z]” “[A-Z]”; }
bash# toUpper myname
MYNAME
bash# 

Upper case to Lower case:

bash# toLower() { echo $1 &#124; tr “[A-Z]” “[a-z]”; }
bash# toLower MYNAME
myname
bash#</description>
		<content:encoded><![CDATA[<p>The same can be represented in this way as well.</p>
<p>Lower case to Upper case:</p>
<p>bash# toUpper() { echo $1 | tr “[a-z]” “[A-Z]”; }<br />
bash# toUpper myname<br />
MYNAME<br />
bash# </p>
<p>Upper case to Lower case:</p>
<p>bash# toLower() { echo $1 | tr “[A-Z]” “[a-z]”; }<br />
bash# toLower MYNAME<br />
myname<br />
bash#</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neo</title>
		<link>http://www.techpulp.com/blog/2008/12/bash-shell-script-to-convert-string-from-lower-to-upper-case-and-vice-versa/#comment-16</link>
		<dc:creator>Neo</dc:creator>
		<pubDate>Sat, 01 Aug 2009 12:00:34 +0000</pubDate>
		<guid isPermaLink="false">http://techpulp.com/?p=328#comment-16</guid>
		<description>Nope. The example given in the article assumes the function to be placed in a bash script. But you are trying to fit all three lines in a single line. So you need a semi-colon.

See the following example:

[neo@techpulp ~]# toUpper() { echo $1 &#124; tr “[:lower:]” “[:upper:]” }
&gt; bash: syntax error: unexpected end of file
[neo@techpulp ~]# toUpper() { echo $1 &#124; tr “[:lower:]” “[:upper:]”; }
[neo@techpulp ~]#

You can see in the first command where a semi-colon is not given, the bash is still expecting some input so I had to press Ctrl+D to get out.

But in the second command where a semi-colon is given, bash is expecting no more input.</description>
		<content:encoded><![CDATA[<p>Nope. The example given in the article assumes the function to be placed in a bash script. But you are trying to fit all three lines in a single line. So you need a semi-colon.</p>
<p>See the following example:</p>
<p>[neo@techpulp ~]# toUpper() { echo $1 | tr “[:lower:]” “[:upper:]” }<br />
&gt; bash: syntax error: unexpected end of file<br />
[neo@techpulp ~]# toUpper() { echo $1 | tr “[:lower:]” “[:upper:]”; }<br />
[neo@techpulp ~]#</p>
<p>You can see in the first command where a semi-colon is not given, the bash is still expecting some input so I had to press Ctrl+D to get out.</p>
<p>But in the second command where a semi-colon is given, bash is expecting no more input.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dmitri Arkhipov</title>
		<link>http://www.techpulp.com/blog/2008/12/bash-shell-script-to-convert-string-from-lower-to-upper-case-and-vice-versa/#comment-15</link>
		<dc:creator>Dmitri Arkhipov</dc:creator>
		<pubDate>Thu, 30 Jul 2009 23:30:39 +0000</pubDate>
		<guid isPermaLink="false">http://techpulp.com/?p=328#comment-15</guid>
		<description>Maybe it&#039;s because I&#039;m using cygwin, but I had to do:
toUpper() { echo $1 &#124; tr  &quot;[:lower:]&quot; &quot;[:upper:]&quot; ; }

Note the semicolon...</description>
		<content:encoded><![CDATA[<p>Maybe it&#8217;s because I&#8217;m using cygwin, but I had to do:<br />
toUpper() { echo $1 | tr  &#8220;[:lower:]&#8221; &#8220;[:upper:]&#8221; ; }</p>
<p>Note the semicolon&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

