How about some neat-o shell tricks for everyone to play with? I figured out some neat things the other day while trying to add some functionality to my shell, specifically through scripts or the profile. What I found was that the magic is in the profile!
Have you ever wanted to have commands that performed certain functions from quick keystrokes rather than long command lines? Of course you have, that’s why we all set aliases in our profiles like ‘ll’ instead of ‘ls -al’ and the like. But what if you want or need more functionality than simple command shortening? That’s what I was after, more function in a smaller form. Some way to pass variables to aliases to get more out of them. Ah, but you can’t pass variables to aliases, so we are stuck right? Wrong, that’s where the functions come in to play.