<?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: Improving command line efficiency via Bash history</title>
	<atom:link href="http://dancingpenguinsoflight.com/2008/12/improving-command-line-efficiency-via-bash-history/feed/" rel="self" type="application/rss+xml" />
	<link>http://dancingpenguinsoflight.com/2008/12/improving-command-line-efficiency-via-bash-history/</link>
	<description></description>
	<lastBuildDate>Sun, 21 Mar 2010 00:42:36 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Samuel Huckins</title>
		<link>http://dancingpenguinsoflight.com/2008/12/improving-command-line-efficiency-via-bash-history/comment-page-1/#comment-658</link>
		<dc:creator>Samuel Huckins</dc:creator>
		<pubDate>Mon, 16 Feb 2009 14:16:37 +0000</pubDate>
		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=365#comment-658</guid>
		<description>@Hugo: I am on the fence about where to put this function. Right now I keep it in my ~/.bashrc. If it were any longer, I would likely pull it out into my directories of personal scripts, symlinked somewhere system-appropriate.

The alias commands I would definitely keep in ~/.bashrc, so that all my defined aliases are in one intuitive place.</description>
		<content:encoded><![CDATA[<p>@Hugo: I am on the fence about where to put this function. Right now I keep it in my ~/.bashrc. If it were any longer, I would likely pull it out into my directories of personal scripts, symlinked somewhere system-appropriate.</p>
<p>The alias commands I would definitely keep in ~/.bashrc, so that all my defined aliases are in one intuitive place.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hugo Heden</title>
		<link>http://dancingpenguinsoflight.com/2008/12/improving-command-line-efficiency-via-bash-history/comment-page-1/#comment-655</link>
		<dc:creator>Hugo Heden</dc:creator>
		<pubDate>Mon, 16 Feb 2009 11:28:10 +0000</pubDate>
		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=365#comment-655</guid>
		<description>Lovely!

Rookie question, sorry:

Do you suggest to put that function in ~/.bashrc ? Or rather as a separate script in ~/bin ?

And the what about the *alias* commands?</description>
		<content:encoded><![CDATA[<p>Lovely!</p>
<p>Rookie question, sorry:</p>
<p>Do you suggest to put that function in ~/.bashrc ? Or rather as a separate script in ~/bin ?</p>
<p>And the what about the *alias* commands?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samuel Huckins</title>
		<link>http://dancingpenguinsoflight.com/2008/12/improving-command-line-efficiency-via-bash-history/comment-page-1/#comment-396</link>
		<dc:creator>Samuel Huckins</dc:creator>
		<pubDate>Mon, 29 Dec 2008 20:44:17 +0000</pubDate>
		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=365#comment-396</guid>
		<description>I wanted to steer clear of just using .bash_history because that doesn&#039;t take into account the format and other options declared in .bashrc and .bash_profile, as the history builtin does. So if you filter out certain commands, or do anything else custom, the file won&#039;t reflect that, which seemed sub-optimal to me.</description>
		<content:encoded><![CDATA[<p>I wanted to steer clear of just using .bash_history because that doesn&#8217;t take into account the format and other options declared in .bashrc and .bash_profile, as the history builtin does. So if you filter out certain commands, or do anything else custom, the file won&#8217;t reflect that, which seemed sub-optimal to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anonim</title>
		<link>http://dancingpenguinsoflight.com/2008/12/improving-command-line-efficiency-via-bash-history/comment-page-1/#comment-395</link>
		<dc:creator>anonim</dc:creator>
		<pubDate>Mon, 29 Dec 2008 20:07:10 +0000</pubDate>
		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=365#comment-395</guid>
		<description>Sorry but I managed to blow the post, here we go again:

import os

def do_history():
    h = open(&#039;%s/.bash_history&#039; % os.environ[&#039;HOME&#039;])
    counter = 0
    for line in h.readlines():
        counter += 1
        print counter, line.replace(&#039;\n&#039;,&#039;&#039;)

if __name__ == &#039;__main__&#039;:
    do_history()</description>
		<content:encoded><![CDATA[<p>Sorry but I managed to blow the post, here we go again:</p>
<p>import os</p>
<p>def do_history():<br />
    h = open(&#8217;%s/.bash_history&#8217; % os.environ['HOME'])<br />
    counter = 0<br />
    for line in h.readlines():<br />
        counter += 1<br />
        print counter, line.replace(&#8217;\n&#8217;,&#8221;)</p>
<p>if __name__ == &#8216;__main__&#8217;:<br />
    do_history()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anonim</title>
		<link>http://dancingpenguinsoflight.com/2008/12/improving-command-line-efficiency-via-bash-history/comment-page-1/#comment-394</link>
		<dc:creator>anonim</dc:creator>
		<pubDate>Mon, 29 Dec 2008 20:05:15 +0000</pubDate>
		<guid isPermaLink="false">http://dancingpenguinsoflight.com/?p=365#comment-394</guid>
		<description>AFAIK history just prints the contents of ~/.bash_history and it&#039;s line number, so you could write that in python, a very quick and dirty solution:

import os

def do_history():
    h = open(&#039;%s/.bash_history&#039; % os.environ[&#039;HOME&#039;])
    counter = 0
    for line in h.readlines():
        counter += 1
        print counter, #!/usr/bin/python                                                                                                                                                                  
import os

def do_history():
    h = open(&#039;%s/.bash_history&#039; % os.environ[&#039;HOME&#039;])
    counter = 0
    for line in h.readlines():
        counter += 1
        print counter, line.replace(&#039;\n&#039;,&#039;&#039;)

if __name__ == &#039;__main__&#039;:
    do_history()</description>
		<content:encoded><![CDATA[<p>AFAIK history just prints the contents of ~/.bash_history and it&#8217;s line number, so you could write that in python, a very quick and dirty solution:</p>
<p>import os</p>
<p>def do_history():<br />
    h = open(&#8217;%s/.bash_history&#8217; % os.environ['HOME'])<br />
    counter = 0<br />
    for line in h.readlines():<br />
        counter += 1<br />
        print counter, #!/usr/bin/python<br />
import os</p>
<p>def do_history():<br />
    h = open(&#8217;%s/.bash_history&#8217; % os.environ['HOME'])<br />
    counter = 0<br />
    for line in h.readlines():<br />
        counter += 1<br />
        print counter, line.replace(&#8217;\n&#8217;,&#8221;)</p>
<p>if __name__ == &#8216;__main__&#8217;:<br />
    do_history()</p>
]]></content:encoded>
	</item>
</channel>
</rss>
