<?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/"
	>

<channel>
	<title>Linux Neophyte &#187; BASH</title>
	<atom:link href="http://linuxneophyte.com/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxneophyte.com</link>
	<description>Trials of a Linux Newb.</description>
	<lastBuildDate>Mon, 20 Oct 2008 12:42:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>SSH Tab Completion in Fedora Core 6</title>
		<link>http://linuxneophyte.com/ssh-tab-completion-in-fedora-core-6/</link>
		<comments>http://linuxneophyte.com/ssh-tab-completion-in-fedora-core-6/#comments</comments>
		<pubDate>Mon, 19 Feb 2007 20:27:36 +0000</pubDate>
		<dc:creator>M@</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[BASH]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Console]]></category>
		<category><![CDATA[FC6]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://linuxneophyte.com/ssh-tab-completion-in-fedora-core-6/</guid>
		<description><![CDATA[I&#8217;ve found that the extended tab-complete functionality in Ubuntu is a major timesaver. I do a LOT of SSHing from machine to machine in my house as well as to machines out there on the Internet. I use my ~/.ssh/config file to set up easy-to-remember names for these machines and then use the command line [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve found that the extended tab-complete functionality in Ubuntu is a major timesaver.  I do a LOT of SSHing from machine to machine in my house as well as to machines out there on the Internet.  I use my <code>~/.ssh/config</code> file to set up easy-to-remember names for these machines and then use the command line to connect.  For example, to connect to my Anapnea.net shell account, I have a block in my config file that looks like this:</p>
<blockquote><p> <code>host anapnea<br />
hostname anapnea.net<br />
user fakeusername<br />
identityfile ~/.ssh/id</code></p></blockquote>
<p>When I want to log in, I open my terminal program of choice and enter <code>ssh ana&lt;tab&gt;</code> and press enter.  Pressing tab expands to <code>anapnea</code> and I make my connection saving 4 keystrokes.</p>
<p><strong>Note: </strong>For those interested, SSH tab-complete will expand to the value of <em>host</em> or <em>hostname</em>.  That&#8217;s handy if you can remember the actual hostname of the machine and you&#8217;ve forgotten what you entered as the value of host (yeah, I&#8217;ve done it).  If that makes no sense to you, you can get more information on SSH config files with <code>man 5 ssh_config</code>.</p>
<p>Tab complete also works with <code>lftp</code> and some other programs when using Ubuntu.  I&#8217;ve found the lack of it in Fedora a little frustrating (I keep pressing tab and get nothing).  I did a little Googling to find out just what program sets up this functionality and checked the Fedora repos for it.  Thankfully it can be found in all it&#8217;s glory and awaiting installation in Fedora extras.</p>
<p><code>su -c 'yum install bash-completion'</code></p>
<p>A few seconds later, you&#8217;re ready to bank your keystrokes and tab complete to your heart&#8217;s content.</p>
<p><strong>Note: </strong>Any terminal sessions that were open when you installed the package won&#8217;t utilize it until you either restart the session or enter <code>bash</code> at the prompt.  It seems that your shell needs to source the newly created <code>/etc/profile.d/bash_completion.sh</code> script.  This is done when you invoke BASH by opening a terminal prompt or executing <code>bash</code> at the command line.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxneophyte.com/ssh-tab-completion-in-fedora-core-6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Anapnea.net: Free Linux Shell Accounts</title>
		<link>http://linuxneophyte.com/anapneanet-free-linux-shell-accounts/</link>
		<comments>http://linuxneophyte.com/anapneanet-free-linux-shell-accounts/#comments</comments>
		<pubDate>Mon, 22 Jan 2007 17:47:47 +0000</pubDate>
		<dc:creator>M@</dc:creator>
				<category><![CDATA[BASH]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Console]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://linuxneophyte.com/anapneanet-free-linux-shell-accounts/</guid>
		<description><![CDATA[http://anapnea.net is offering free Linux shell accounts to those that would like to apply. I read about this on Sunday morning (yesterday) via Digg and decided to give it shot. I joined the IRC channel (#anapnea on FreeNode) and queried cyraq asking about the application. It was a simple process, he asked why I needed [...]]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://anapnea.net/">http://anapnea.net</a> is offering free Linux <a target="_blank" href="http://en.wikipedia.org/wiki/Shell_account">shell accounts</a> to those that would like to apply.  I read about this on Sunday morning (yesterday) via <a target="_blank" href="http://digg.com/">Digg</a> and decided to give it shot.  I joined the IRC channel (#anapnea on <a target="_blank" href="http://freenode.net/">FreeNode</a>) and queried cyraq asking about the application.  It was a simple process, he asked why I needed the account (explaining that this is a standard application question) and I told him that I&#8217;m new to Linux, and for me, it&#8217;s a learning experience.  After that, I just had to provide him with my desired username. <img src='http://linuxneophyte.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I figure sharing a system with others can teach me a few things, I looked at it from a newb&#8217;s point of view and here are some of the reasons I came up with for checking out Anapnea.</p>
<p><strong>Community:</strong>  The IRC channel is full of people buzzing about the service, asking questions, and giving each other help.  It seems to be a combination of newish to seasoned Linux/Unix users that are excited about the service.  If you&#8217;re just getting started with Linux, this is a great way to get some help.  Everyone using that service is using the exact same software as you.  If you have a question, ask, you&#8217;re almost sure to get an answer.</p>
<p><strong>Introduction to Console Applications:</strong>  You&#8217;ll have access to several well known communication applications.  IRSSI, CenterICQ and others.  These are common Linux tools for communicating on IRC and IM networks.  You can read about some of them on the Anapnea home page.  The apps are already installed for you, all you have to do is try them out.  See what you like or don&#8217;t like.  I would suggest reading up on <a target="_blank" href="http://irssi.org/">IRSSI</a>, if you&#8217;re totally green, it&#8217;s not the easiest application to configure.  That said, it&#8217;s the IRC client I&#8217;ve been using since I first gave Linux a shot.  It&#8217;s terrific!.</p>
<p><strong>Resource Sharing:</strong>  By sharing a system with others, you get a feel for the right and wrong things to do when on a multi-user system.  Poking around in other people&#8217;s home dirs would fall into the &#8220;wrong&#8221; category.  That is a sure way to get your account revoked.  I watched somebody lose his account today because he was doing just that.  You are permitted to protect your directory from peekers, and I would do so (<code>chmod 700 $HOME</code>).</p>
<p><strong>Introduction to SSH:</strong>  SSH (Secure Shell) is the most common way to remotely log into a Linux server.  If you haven&#8217;t yet made the jump to Linux, you might not even  be aware of how useful SSH is (trust me, it&#8217;s amazing).  Why not try it out, you can use an app like PuTTy on your Windows box to log into your account and muck about with Linux applications.</p>
<p><strong>Customizing a BASH Environment:</strong>  OK, this may not be for the super newbie, <a target="_blank" href="http://en.wikipedia.org/wiki/BASH">BASH</a> is the shell you&#8217;ll be using to interact with the computer.  There are <em>[insert some insanely high, random number]</em> of things you can do with BASH.  Again, this comes in really handy if you haven&#8217;t got your own Linux box to play with but want to poke around.  Not to worry if you really are 100% new to Linux, BASH doesn&#8217;t require customization to use it.</p>
<p>An account on Anapnea isn&#8217;t a replacement for your own Linux machine, you will only have 5 MB of storage and access to a limited number of applications.  It is however, a great way to get your feet wet AND have some free web space out there on the Internet.</p>
<p>Another cool note, when asked if you&#8217;re a Gentoo user, you can proudly say Yes!</p>
<p><strong>About Anapnea.net:</strong></p>
<p>This morning, I spent a few minutes talking to cyraq, I wanted to know just why the hell he was offering this service, and maybe find out a little bit about him.  It turns out his reason for starting Anapnea, was to help people who needed a shell account but didn&#8217;t necessarily have the means to buy one.  If you&#8217;re not sure why anyone would need/want a remote shell account, I can offer an example.  I have a friend who&#8217;s university won&#8217;t permit the use of IRC on their network.  Being a student, he doesn&#8217;t have extra money for a shell account.  This is a perfect solution for him, he can use IRC resources without violating the University&#8217;s rules.</p>
<p>The first two weeks of Anapnea&#8217;s life went well.  News spread of its existence through word of mouth, people would sign up (who wouldn&#8217;t?) and a small community began to develop.   Eventually, it was <a target="_blank" href="http://digg.com/linux_unix/Anapnea_Free_linux_shell_account_hosting_on_a_supercomputer">Dugg</a> and In a period of 12 hours, cyraq went from being the sole administrator of 48 accounts, to the leader of a 3 person administration team that now had to manage 370 accounts (one of which I own).  I can&#8217;t tell the story better than he, so&#8230;</p>
<blockquote><p>(16:26) (mattds) and this was pretty much overnight?<br />
(16:26) (cyraq) yeah, woke up at 3AM to get some water, and on the way checked my email<br />
(16:26) (cyraq) You have 126 new emails.<br />
(16:27) (cyraq) stayed up till 3PM<br />
(16:27) (cyraq) went back to sleep at 6PM<br />
(16:27) (cyraq) at one point, the emails were coming faster than i could answer them</p></blockquote>
<p>I don&#8217;t have any info on the newest members of the team (lightdifference and Mike42), but I do know that cyraq is a young admin and by his own admission, very passionate about Linux.  I think it&#8217;s great that he&#8217;s giving back to the community by offering this service.  Another reason to embrace Linux and the people involved with it.</p>
<p><strong>Disclaimer:</strong> I&#8217;m not a reporter, my apologies if that&#8217;s the lamest summary of an interview you&#8217;ve ever read <img src='http://linuxneophyte.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://linuxneophyte.com/anapneanet-free-linux-shell-accounts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Newbie I/O Redirection</title>
		<link>http://linuxneophyte.com/newbie-io-redirection/</link>
		<comments>http://linuxneophyte.com/newbie-io-redirection/#comments</comments>
		<pubDate>Sat, 09 Dec 2006 04:55:01 +0000</pubDate>
		<dc:creator>M@</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[BASH]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Console]]></category>
		<category><![CDATA[Getting Help]]></category>

		<guid isPermaLink="false">http://newbie.linuxworldnet.com/newbie-io-redirection/</guid>
		<description><![CDATA[I&#8217;ve been playing around with redirection for the LBO course I&#8217;m following. I find what you can do with redirection fascinating (could be that I&#8217;m just easily amused). This is all command line work, so if you&#8217;re interested in honing your CLI-fu, read on. Some of this is really basic, some of it not so [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with redirection for the <a target="_blank" href="http://linuxbasics.org">LBO</a> course I&#8217;m following.  I find what you can do with redirection fascinating (could be that I&#8217;m just easily amused).  This is all command line work, so if you&#8217;re interested in honing your <a target="_blank" href="http://en.wikipedia.org/wiki/Command_line_interface">CLI</a>-fu, read on.  Some of this is really basic, some of it not so much.</p>
<p><em><strong>NOTE:</strong> All of these commands should be executed with your regular user account.  Don&#8217;t prefix the commands with sudo, don&#8217;t be operating as root.</em></p>
<p>First things first, you need to know a little about standard input, output and error.  Standard input is usually your keyboard, standard out and standard error are usually your screen (or some window on your screen).  Each of these 3 types of I/O (input/output) streams have an identifier associated with them called a <a target="_blank" href="http://en.wikipedia.org/wiki/File_descriptor">file descriptor</a>.  In short, the file descriptor is an positive integer used to reference I/O.</p>
<p>* Standard input: 0<br />
* Standard output: 1<br />
* Standard error: 2</p>
<p><em>Before reading on, perform a <code>man ls, man cat &#038; man less</code> to familiarize yourself with the commands we&#8217;ll be using.</em></p>
<p>A simple form of redirection can be illustrated with <code>ls > dirlist</code>.   The greater than operator (>) redirects the results of <code>ls</code> to the file <code>dirlist</code>.  If the file doesn&#8217;t exist when you execute the command, it will be created. If it does exist, it will be overwritten with the output from <code>ls</code>.  After executing the command you can use <code>cat dirlist |less</code> to page through the contents of the file in your terminal.  The <code>cat</code> command we issued to view the file uses another type of redirection that will be explained shortly.</p>
<p>In this example, you can append output to existing files with a double greater than (>>).  If you want to keep a copy of your directory list with the time and date it was created appended to the bottom of the file you could execute <code>date >> dirlist</code>.  Perform a <code>cat dirlist</code> to view the changes to the file.</p>
<p>In summary, using greater than (and double greater than), we&#8217;ve redirected standard output to a file instead of your screen. With the <code>cat</code> command we&#8217;ve redirected standard output from your screen to the input of another program (explained in the next section).</p>
<p><em>Before reading on, perform a <code>man tee</code> to familiarize yourself with the command we&#8217;ll be using. </em></p>
<p>You can also redirect the output from one program to the input of another.  If you wanted to see the output of <code>ls</code> on screen as well as have it written to a file you could enter <code>ls |tee dirlist</code>.  The vertical bar (referred to as <a target="_blank" href="http://en.wikipedia.org/wiki/Pipe_%28Unix%29">pipe</a>) character hands the output of <code>ls</code> to the program <code>tee</code> which writes its output to standard output (your screen) as well as a file.</p>
<p>The <code>cat</code> command back in step one worked the same way, the output from <code>cat</code> became the input for <code>less</code> and good ole&#8217; <code>less</code> just spit its results to standard output and you got to read the file in pages.</p>
<p>So, it&#8217;s pretty simple to write output to files (<code>> &#038; >></code>), and it&#8217;s equally as simple to send output to other programs as input (<code>|</code>).</p>
<p>Here&#8217;s where the fun begins folks <img src='http://linuxneophyte.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Standard out and standard error are normally written to your screen, you would find any errors lines mixed in with non-error lines (this will be clear in a moment).  We have the option of directing one or both streams to different locations.  This is useful when performing a command that has gobs of results and we want to carefully review them.  This is where the file descriptors for output and error come into play.</p>
<p><code>ls -R /etc/ 1> ~/goodnews 2> ~/badnews</code></p>
<p>This command performs a recursive directory listing of <code>/etc</code> redirecting the results of standard output (<code>1></code>) to a file in your home directory named <code>goodnews</code> as well as redirecting standard error (<code>2></code>) to a file named <code>badnews</code>. This command should return a few errors because of file permissions so execute the command and review the results.  Pretty handy eh&#8217;?</p>
<p>Here&#8217;s my FAVORITE new toy.  Not only can we send the results to files, but we can redirect output to other terminal sessions. Just for the joy of it, start 3 terminal sessions and arrange them so you can see them all at once.  In each terminal, you will need to enter the command <code>tty</code>.  The output will give you the device number of the current PTS (pts is a psuedo terminal).  The results will look something like <code>/dev/pts/x</code> where <code>x</code> is a number.  I&#8217;ll be using /dev/pts/8, 9 and 10.</p>
<p>In terminal that returned <code>/dev/pts/8</code> I enter:</p>
<p><code>ls -R /etc/ 1> /dev/pts/9 2> /dev/pts/10</code></p>
<p>All of the non-error messages (standard output) are sent to <code>/dev/pts/9</code> and all of the errors (standard error) are sent to <code>/dev/pts/10</code>.  You can&#8217;t tell me that isn&#8217;t the coolest thing <img src='http://linuxneophyte.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>These are just a few examples of redirection, there&#8217;s a lot more that you can do with it.  Chapter 5 of the <a target="_blank" href="http://linuxbasics.org/course/book/index">LBook</a> on <a target="_blank" href="http://linuxbasics.org">http://linuxbasics.org</a> will give you more information and a series of useful exercises following the reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxneophyte.com/newbie-io-redirection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

