
Introduction to Unix shell - digitalnalogika
http://matt.might.net/articles/settling-into-unix/
======
peterwwillis
I actually got to know Unix with a little paperback reference book:
[http://www.amazon.com/Pocket-Guide-Unix-Michele-
Petrovsky/dp...](http://www.amazon.com/Pocket-Guide-Unix-Michele-
Petrovsky/dp/076453226X) After you learn the "unix basics" the most valuable
thing I found was reading the description of every single common Unix command.
I'm pretty sure I also had a small pocket reference which had the same
information in a more compact form, and I found myself reading that everywhere
I went. Here's a similar book from O'Reilly:
<http://shop.oreilly.com/product/9781565924277.do>

Here's another little guide which goes over all the general topics:
[https://docs.google.com/viewer?a=v&q=cache:4oBqPlq1f7oJ:...](https://docs.google.com/viewer?a=v&q=cache:4oBqPlq1f7oJ:www.csus.edu/training/handouts/workshops/unixgde.pdf+&hl=en&gl=us&pid=bl&srcid=ADGEESihmAvYFNhgCgnMZrGG0awgUfwOAuOwe-
SWuZUpZFZaP1BlyTWhkwC2kheCyc9IVwB_Uc0yH_Phfh4qvv-1C3-ctdv5l4mrupy_dZswTvxF0trsviN1V1TSM2dzN-
yVxOFlnNAP&sig=AHIEtbRFddqlsuQHR_AnZW4BP4Xl8g-s-Q&pli=1)

------
agumonkey
I skip a beat, but any shell user will need this at some point in his life :
<http://mywiki.wooledge.org/>

So many 'I wish I'd known earlier'

Other links straight from #bash@freenode

Topic for #bash is: FAQ: <http://mywiki.wooledge.org/BashFAQ> | Guide:
<http://mywiki.wooledge.org/BashGuide> | ref: <http://xrl.us/bhk9ww> |
<http://wiki.bash-hackers.org/> | USE MORE QUOTES!:
<http://www.grymoire.com/Unix/Quote.html> | Scripts and more:
<http://www.shelldorado.com/> | New official help mailing list:
<http://tx0.org/31f>

They're all deeply useful

------
JoelMcCracken
Only slightly on topic, but the choice of shell discussion always interests
me.

Within the open source world, I hear about sh, bash, zsh, fish, and
occasionally scsh.

It is _only_ in the academic world that I ever hear discussion about things
like csh or tcsh.

Anyone know why?

~~~
burgerbrain
IIRC, the default shell on many BSDs is tcsh. I guess it was probably csh
before that in some point in history. That might have something to do with it.

~~~
SomeOtherGuy
Only FreeBSD. OpenBSD and NetBSD aren't that fucked up.

~~~
burgerbrain
And OSX prior to 10.3 apparently.

~~~
Hemospectrum
Inherited from FreeBSD, of course.

Everyone complained so they changed it.

------
clvv
> It's a near certainty that a bash interpreter will be available on a Unix
> system; bash has become the JVM of the Unix world.

Don't assume this if you want your shell scripts to be portable. Follow posix
standard instead.

------
neilparikh
I found what seems to be a small error in your article. In the vim section it
says "To switch to command mode from insertion mode, press i." I think it
should say "To switch _from_ command mode _to_ insertion mode, press i."

------
gphil
For some reason I never thought of doing this before:

    
    
            alias might='ssh matt@might.net'
    

So you can do things like "might df" as he mentions. This seems super-useful
if you deal with remote servers.

~~~
phren0logy
You might be better off using a .ssh/config file, as in this tutorial:

<http://fabien.potencier.org/article/19/quick-ssh-tip>

It saves about as many keystrokes, also works in scp, and won't clutter up
your shell dotfiles.

------
jff
[http://en.wikipedia.org/wiki/The_UNIX_Programming_Environmen...](http://en.wikipedia.org/wiki/The_UNIX_Programming_Environment)
all you'll ever need?

~~~
anon_d
This book is excellent!

------
g3orge
I can't wait for the next articles...

~~~
antics
This was the lecture for Matt's scripting languages class today. If you'd like
a head start on the material, take a look at the materials section of the
course page:

[http://matt.might.net/teaching/scripting-
languages/spring-20...](http://matt.might.net/teaching/scripting-
languages/spring-2012/#material)

------
funkah
_Tip: The default Bourne-shell-compatible prompts end with $ while the default
C-shell-compatible prompts end with % or >. (zsh is an exception to this.)
Root (super-user) prompts often end with # by default. Of course, this
behavior is configurable. _

Gee, who could ever find that confusing?!

As much as I love Unix now, I can't help but understand when the author says
students see the above as a "baroque regression". It just seems so
ridiculously arcane when you're used to clicking on things. Of course things
are much better once you're on the other side of the learning curve, but it
can be a doozy.

~~~
dredmorbius
Well, the above descriptions of shell prompts _are_ the defaults.

If you strip out all configuration files, this is the behavior you'll see.

Of course, it's better to explicitly check to see what shell you're running
('help', 'ps up $$', grep $UID /etc/passwd | cut -d: -f7').

------
SomeOtherGuy
>It's a near certainty that a bash interpreter will be available on a Unix
system

Someone confused "linux" and "unix". Linux systems almost certainly have bash
installed. BSDs and commercial unixes don't.

