Thank You, Bash!

by chromatic

Sure, it's an oldie, but I use GNU bash every day and have no idea how I'd get my work done without it.

Not only do I have a reliable stable of shell scripts (my favorite is xt, which fills my screen with appropriately-placed XTerms in the current directory--it's great for programming !), but I use bash completion to make the tab and space keys more powerful.

When a full shell script is too much, Damian Conway's realias trick has saved me an immense amount of time.

Simon Myers' Power Shell Usage is full of wonderful bash tips and tricks. I'm a big fan of Ctrl-r and $!, for example.

There are dozens of bash features I've never even heard of and might one day use. The level of customization and flexibility from a really good command line makes it almost painful to use a GUI sometimes. Fortunately, I don't even have to think about what I'm doing. Yes, bash is that good.

Thank you to all of the shell developers and documenters and contributors who keep the command line flexible, powerful, and useful.


2007-02-28 02:05:16
Godd mornig US Westcoast. Munich OS Freak here... :P
Ralph Corderoy
2007-03-03 09:36:02
$! is the PID of the last command ran in the background. Whilst useful, did you mean !$ which is the last word of the last command? !^ is similarly useful, as is ^old^new.

-- Ralph.

2007-04-29 11:47:13
Two of my favorites:
# I often find myself switching between two directories:
alias bd='cd "$OLDPWD"'

# From .inputrc, if the last arg of the last command was a directory, go to that directory:
"\M-d": "cd \M-."

2008-03-17 03:06:12
tom, you could also use
cd -
instead of
cd "$OLDPWD"
or creating a new alias :)