<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>Will Norris &#187; bash</title>
	<atom:link href="http://willnorris.com/tag/bash/feed" rel="self" type="application/rss+xml" />
	<link>http://willnorris.com</link>
	<description>there&#039;s more to life than this</description>
	<lastBuildDate>Sun, 05 Feb 2012 17:41:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
		<item>
		<title>git: Duplicate Signed-off-by lines</title>
		<link>http://willnorris.com/2009/02/git-duplicate-signed-off-by-lines</link>
		<comments>http://willnorris.com/2009/02/git-duplicate-signed-off-by-lines#comments</comments>
		<pubDate>Sat, 14 Feb 2009 23:05:25 +0000</pubDate>
		<dc:creator>Will Norris</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://willnorris.com/?p=495</guid>
		<description><![CDATA[I&#8217;ve been playing around with git a lot as an alternative to subversion and am really loving it. However, I&#8217;m getting an error every time I try to commit: Duplicate Signed-off-by lines. I can see where this is being thrown inside .git/hooks/commit-msg, but it wasn&#8217;t immediately obvious what the problem was. I did a quick [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with <a href="http://git-scm.com/">git</a> a lot as an alternative to subversion and am really loving it.  However, I&#8217;m getting an error every time I try to commit:</p>

<pre><code>Duplicate Signed-off-by lines.
</code></pre>

<p>I can see where this is being thrown inside <code>.git/hooks/commit-msg</code>, but it wasn&#8217;t immediately obvious what the problem was.  I did a quick google search and found that others have had the same problem, but at least some members of the git community have been <a href="http://n2.nabble.com/duplicate-sign-off-by-error-td2259305.html#nabble.msgtxt2260129">less than helpful</a>.  I did figure out the problem, and figured I&#8217;d share it here for others.</p>

<p>The commit-msg script is written using bash style <a href="http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_04.html">shell expansions</a>,</p>

<pre><code>foo = $(bar)
</code></pre>

<p>while the <a href="http://en.wikipedia.org/wiki/Shebang_(Unix)">shebang</a> at the top of the file is set to <code>/bin/sh</code>.  On many systems, this is not a bash shell.  The solution is to simply modify the shebang to wherever bash is on your system (probably <code>/usr/bin/bash</code> or similar).</p>
]]></content:encoded>
			<wfw:commentRss>http://willnorris.com/2009/02/git-duplicate-signed-off-by-lines/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>bash one-liners</title>
		<link>http://willnorris.com/2005/03/bash-one-liners</link>
		<comments>http://willnorris.com/2005/03/bash-one-liners#comments</comments>
		<pubDate>Wed, 30 Mar 2005 04:52:55 +0000</pubDate>
		<dc:creator>Will Norris</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://willnorris.com/wordpress/2005/03/bash-one-liners</guid>
		<description><![CDATA[I&#8217;ve moved my one-liners to textsnippets.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve moved my one-liners to <a href="http://textsnippets.com/user/will">textsnippets</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://willnorris.com/2005/03/bash-one-liners/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>~/.bashrc</title>
		<link>http://willnorris.com/2005/03/bashrc</link>
		<comments>http://willnorris.com/2005/03/bashrc#comments</comments>
		<pubDate>Mon, 14 Mar 2005 14:11:07 +0000</pubDate>
		<dc:creator>Will Norris</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://willnorris.com/wordpress/2005/03/bashrc</guid>
		<description><![CDATA[[Edit: 2005-03-14] I discovered I didn&#8217;t explain this nearly enough, so I&#8217;m going back and providing a little more detail as to how this all works. It&#8217;s taken me a while, but I think I&#8217;ve finally got my bashrc files to a setup I&#8217;m pretty happy with. I&#8217;ve provided it here in hopes that others [...]]]></description>
			<content:encoded><![CDATA[<p>[Edit: 2005-03-14] I discovered I didn&#8217;t explain this nearly enough, so I&#8217;m
going back and providing a little more detail as to how this all works.</p>

<p>It&#8217;s taken me a while, but I think I&#8217;ve finally got my bashrc files to a setup
I&#8217;m pretty happy with. I&#8217;ve provided it here in hopes that others might find
it useful&#8230;</p>

<p>The main thing I was trying to accomplish here  was to have a single set of
files that I could use on all the machines I work on.  This becomes more
complicated considering what I use&#8230; my personal machine is MacOS X, this
website is hosted on Linux, and my primary development machine at UofM is
SunOS.  Additionally, there are certain settings I want on all Visible
School machines (regardless of OS or hostname) but no others.  Additionally, I
like to have a minimalistic terminal prompt, so I use color to know what host
I&#8217;m connected to.  What I ended up with is this <a href="http://willnorris.com/~wnorris/.bashrc"><code>~/.bashrc</code></a>.</p>

<!-- more -->

<p>This file is basically a launchpad for all of my other files, so let me
explain how this all works line by line&#8230;</p>

<pre><code>HOST=`hostname | sed "s/\..*$//"`
DOMAIN=`hostname | sed "s/^[^\.]*//" | sed "s/^\.//"`
</code></pre>

<p>First, I need to know the hostname and the domain of the machine I&#8217;m
presently using.  I&#8217;ve found the above one-liners to work on every operating
system I&#8217;ve tested so far.</p>

<pre><code>[ -f /etc/bashrc ] &amp;&amp; [ -r /etc/bashrc ] &amp;&amp; source /etc/bashrc
</code></pre>

<p>If the machine has a system-wide bashrc that is readable,
go ahead and execute that.  This is where a system administrator may setup
PATHs specific to this machine.</p>

<pre><code>[ -f ~/.bash/all ] &amp;&amp; [ -r ~/.bash/all ] &amp;&amp; source ~/.bash/all
</code></pre>

<p><a href="/~wnorris/.bash/all.pre.login">~/.bash/all.pre.login</a> contains
things that should be used by all machines&#8230;  things like my name, default
editor, various aliases, etc, as well as a custom function to setup my
prompt</p>

<!--
It first checks for a system-wide bashrc, then calls my
[`~/.bash/all.pre.login`][~/.bash/all.pre.login], and then runs appropriate bash scripts based on
the [operating system][~/.bash/os], the [network][~/.bash/network] it is a
part of, and its [hostname][~/.bash/host].  So long as you are careful to put
things in the appropriate file, everything begins to disappear into the
background and you don't have to think about your bash environment.
-->
]]></content:encoded>
			<wfw:commentRss>http://willnorris.com/2005/03/bashrc/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

