<?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: Fun with Linux Commands-III &#8211; Being productive</title>
	<atom:link href="http://www.quicktweaks.com/2008/11/01/fun-with-linux-commands-iii-being-productive/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.quicktweaks.com/2008/11/01/fun-with-linux-commands-iii-being-productive/</link>
	<description>Quick Tweaks For Your System</description>
	<lastBuildDate>Sat, 28 Nov 2009 03:06:08 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: زندگی من &#187; دستوراتی برای افراد نابغه</title>
		<link>http://www.quicktweaks.com/2008/11/01/fun-with-linux-commands-iii-being-productive/comment-page-1/#comment-3491</link>
		<dc:creator>زندگی من &#187; دستوراتی برای افراد نابغه</dc:creator>
		<pubDate>Fri, 04 Sep 2009 20:47:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.quicktweaks.com/?p=252#comment-3491</guid>
		<description>[...] منبع     دسته هاابونتو, خط فرمان, لینوکس برچسب ها:linux, terminal, ubuntu, ابونتو, اسکریپت, خط فرمان, دستور, دستورات خنده دار, دستورات مفید, لینوکس        دیدگاه ها (0) بازتاب ها (0) دیدگاهتان را بنویسید بازتاب [...]</description>
		<content:encoded><![CDATA[<p>[...] منبع     دسته هاابونتو, خط فرمان, لینوکس برچسب ها:linux, terminal, ubuntu, ابونتو, اسکریپت, خط فرمان, دستور, دستورات خنده دار, دستورات مفید, لینوکس        دیدگاه ها (0) بازتاب ها (0) دیدگاهتان را بنویسید بازتاب [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: دستوراتی برای افراد نابغه &#171; Linux</title>
		<link>http://www.quicktweaks.com/2008/11/01/fun-with-linux-commands-iii-being-productive/comment-page-1/#comment-1039</link>
		<dc:creator>دستوراتی برای افراد نابغه &#171; Linux</dc:creator>
		<pubDate>Mon, 16 Feb 2009 12:39:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.quicktweaks.com/?p=252#comment-1039</guid>
		<description>[...] منبع [...]</description>
		<content:encoded><![CDATA[<p>[...] منبع [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GoblinX Project &#187; Issue 172, News &#38; Note</title>
		<link>http://www.quicktweaks.com/2008/11/01/fun-with-linux-commands-iii-being-productive/comment-page-1/#comment-606</link>
		<dc:creator>GoblinX Project &#187; Issue 172, News &#38; Note</dc:creator>
		<pubDate>Thu, 06 Nov 2008 12:46:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.quicktweaks.com/?p=252#comment-606</guid>
		<description>[...] Fun With Linux Command III [...]</description>
		<content:encoded><![CDATA[<p>[...] Fun With Linux Command III [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alan</title>
		<link>http://www.quicktweaks.com/2008/11/01/fun-with-linux-commands-iii-being-productive/comment-page-1/#comment-600</link>
		<dc:creator>alan</dc:creator>
		<pubDate>Tue, 04 Nov 2008 15:39:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.quicktweaks.com/?p=252#comment-600</guid>
		<description>In your scripts you are  execing /bin/bash over and over again? For someone who leaves a shell open and uses it continually,  your scripts would  use up resources because you&#039;ll have many instances of bash running. This method also hoses up your history. Try this:

Open a shell and execute the command

    ps -ef &#124; grep bash

Then run your script twice:

    up 2
    up 2

Rerun the ps command and you will see two more instances of /bin/bash running. Each of these uses resources. Also if you now look at your history, you&#039;ll see that some recent commands are not present. 

In order to &quot;fix&quot; this, you&#039;d need to run an exit command for each instance of the up script, which would of course undo the directory change.

The easiest way to make a cd in a script &quot;stick&quot; is to use a &quot;. &quot; (dot space) before the command. For example, 

    . myscript

could make cd commands and other environment changes  in the script stick after the script exits without spawning a new shell 

Also, its generally considered bad form to copy scripts into /bin. Most users I know create a local bin directory under their user account and put their own scripts there. This has the added benefit that all the scripts you create are immune to system upgrades if /home is on a separate partition or you back up user data before upgrading.

I don&#039;t mean to be picky, but new users will look at what you write as gospel. Teaching them bad habits to begin with is not a good way to start.

Regard,
    alan</description>
		<content:encoded><![CDATA[<p>In your scripts you are  execing /bin/bash over and over again? For someone who leaves a shell open and uses it continually,  your scripts would  use up resources because you&#8217;ll have many instances of bash running. This method also hoses up your history. Try this:</p>
<p>Open a shell and execute the command</p>
<p>    ps -ef | grep bash</p>
<p>Then run your script twice:</p>
<p>    up 2<br />
    up 2</p>
<p>Rerun the ps command and you will see two more instances of /bin/bash running. Each of these uses resources. Also if you now look at your history, you&#8217;ll see that some recent commands are not present. </p>
<p>In order to &#8220;fix&#8221; this, you&#8217;d need to run an exit command for each instance of the up script, which would of course undo the directory change.</p>
<p>The easiest way to make a cd in a script &#8220;stick&#8221; is to use a &#8220;. &#8221; (dot space) before the command. For example, </p>
<p>    . myscript</p>
<p>could make cd commands and other environment changes  in the script stick after the script exits without spawning a new shell </p>
<p>Also, its generally considered bad form to copy scripts into /bin. Most users I know create a local bin directory under their user account and put their own scripts there. This has the added benefit that all the scripts you create are immune to system upgrades if /home is on a separate partition or you back up user data before upgrading.</p>
<p>I don&#8217;t mean to be picky, but new users will look at what you write as gospel. Teaching them bad habits to begin with is not a good way to start.</p>
<p>Regard,<br />
    alan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hello from Linux!</title>
		<link>http://www.quicktweaks.com/2008/11/01/fun-with-linux-commands-iii-being-productive/comment-page-1/#comment-593</link>
		<dc:creator>Hello from Linux!</dc:creator>
		<pubDate>Sun, 02 Nov 2008 14:43:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.quicktweaks.com/?p=252#comment-593</guid>
		<description>[...] Quicktweaks shows how to let your GNU/Linux system say something. Isn&#8217;t that fascinating? You can have your computer tell you that you have mail, or you could have a story read out loud if you need to be away from the keyboard for a while. [...]</description>
		<content:encoded><![CDATA[<p>[...] Quicktweaks shows how to let your GNU/Linux system say something. Isn&#8217;t that fascinating? You can have your computer tell you that you have mail, or you could have a story read out loud if you need to be away from the keyboard for a while. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.558 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2009-11-28 05:52:48 -->
<!-- Compression = gzip -->