Bash bash bash

Yes, indeed bash has become my favorite shell. Not only is it so versatile, but some of those advanced features make it best-suited for almost any task you’ll ever face on a console. And if it is not enough for a particular task, a simple perl -e or a few of those typical POSIX utilities such as find, awk, tr, cut, cat, grep, tar, bzip2, gzip and so on in a row piping output from one to the other will do wonders.

Besides, with the subshells that you can create on demand using backticks or, for example $(commands) are wonderful when used in conjunction with SSH to pipe input from/to a remote SSH session. Yes, scrap SCP and SFTP, SSH can do without them. In fact I built a little (bash) script at FRISK, which can be used to deploy certain files to all target systems and then even execute commands there. SSH-authentication via private/public key can be so useful if you have a distributed build-system 😉

Anyway, recently I already showed what nice things you can do with Bash, by “hooking” a script that you wouldn’t otherwise want to modify. Now it’s time to reveal how my .bashrc looks. Note, that I use the same .bashrc for my own account and for the super user, so some code is simply never called when running as a normal user. I hope this will help others to create their own customized version of .bashrc

Download my .bashrc here

// Oliver

This entry was posted in EN, Linux, Programming, Software. Bookmark the permalink.

3 Responses to Bash bash bash

  1. Oliver says:

    Oh yeah, in case someone wants to know the “features” of my .bashrc:

    – prompt command on capable terminals
    – removes world-writable dirs from $PATH for root
    – several tweaks for usability (use man bash)
    – use ~/.bashrc.d/ to store further configuration items (e.g. aliases)

  2. Aaron says:

    Have you ever tried zsh? Its an amazing shell with lots of features the bash cant keep up 🙂 The initial configuration is a little bit towing, but if the zsh is set up, its an powerful tool i would never ever miss.

  3. Oliver says:

    Haven’t, but what the heck, nothing easier than that. I’ll test it on one of my installed Linuxes 😉

Leave a Reply

Your email address will not be published. Required fields are marked *