<?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: Deeper into Function Complexities with Shell Scripting – Part VII	</title>
	<atom:link href="https://www.tecmint.com/deeper-into-function-complexities-with-shell-scripting-part-vii/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.tecmint.com/deeper-into-function-complexities-with-shell-scripting-part-vii/</link>
	<description>Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks.</description>
	<lastBuildDate>Mon, 05 Oct 2015 17:23:21 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Anoop C S		</title>
		<link>https://www.tecmint.com/deeper-into-function-complexities-with-shell-scripting-part-vii/comment-page-1/#comment-679582</link>

		<dc:creator><![CDATA[Anoop C S]]></dc:creator>
		<pubDate>Mon, 05 Oct 2015 17:23:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=5886#comment-679582</guid>

					<description><![CDATA[Try to understand the difference based on the output of following shell script:

#!/bin/bash

function return_func () {
	echo &quot;I&#039;m returning, but not exiting . . .&quot;
	return 1
	echo &quot;This will not be displayed :-)&quot;
}

function exit_func () {
	echo &quot;I&#039;m exiting . . .&quot;
	exit 0
	echo &quot;This will not be displayed :-)&quot;
}

echo
echo &quot;Before returning.&quot;
echo
return_func
if [ $? -eq 1 ]; then
	echo
	echo &quot;Before exiting.&quot;
	echo
	exit_func
fi
echo
echo &quot;And you will not see this on execution&quot;
exit 2

Check the output status using $? immediately after the execution of the above script. I hope that&#039;s clear.]]></description>
			<content:encoded><![CDATA[<p>Try to understand the difference based on the output of following shell script:</p>
<p>#!/bin/bash</p>
<p>function return_func () {<br />
	echo &#8220;I&#8217;m returning, but not exiting . . .&#8221;<br />
	return 1<br />
	echo &#8220;This will not be displayed :-)&#8221;<br />
}</p>
<p>function exit_func () {<br />
	echo &#8220;I&#8217;m exiting . . .&#8221;<br />
	exit 0<br />
	echo &#8220;This will not be displayed :-)&#8221;<br />
}</p>
<p>echo<br />
echo &#8220;Before returning.&#8221;<br />
echo<br />
return_func<br />
if [ $? -eq 1 ]; then<br />
	echo<br />
	echo &#8220;Before exiting.&#8221;<br />
	echo<br />
	exit_func<br />
fi<br />
echo<br />
echo &#8220;And you will not see this on execution&#8221;<br />
exit 2</p>
<p>Check the output status using $? immediately after the execution of the above script. I hope that&#8217;s clear.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Aaron Kili K		</title>
		<link>https://www.tecmint.com/deeper-into-function-complexities-with-shell-scripting-part-vii/comment-page-1/#comment-676826</link>

		<dc:creator><![CDATA[Aaron Kili K]]></dc:creator>
		<pubDate>Wed, 30 Sep 2015 14:13:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=5886#comment-676826</guid>

					<description><![CDATA[what is the difference between a return statement and an exit statement in shell functions.

Could you explain with some brief examples.]]></description>
			<content:encoded><![CDATA[<p>what is the difference between a return statement and an exit statement in shell functions.</p>
<p>Could you explain with some brief examples.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
