Improved some basic bash functionality.

Seen a few of them been used in the wild.