Monthly Archives: November 2011

In-Line Search And Replace With Perl Regular Expressions.

Go ahead and skip right to the examples if you’re in a hurry 😉 perl -p -i -e ‘s/change this/to that/g’ file1 file2 file3… Got Regexes? Regular Expressions (also known as regexes, regexen, and regexps) open up a world of new power tools to you when you need to automate text analysis or manipulations such… Read More »

My Ever-Evolving Bash Profile

Please feel free to experiment with the following ~/.bash_profile goodness of my own, and save away to yours what tasty morsels that you find useful. Exactly what each line does below is left as an exercise to the reader 😉 but to summarize— these aliases speed up common tasks, keep embedded timestamps in your history,… Read More »

Monitor Processor Temperature From The Command Line

Do you ever need to/want to know how hot your processors are running? There’s a way! Sure, there are handy gui tools for things like this, but for our purposes, sometimes a quick, clean little shell code snippet gets the job done quite nicely. Take, for instance when you are running something CPU intensive, like… Read More »

Send An Email When Someone Logs In

You can send out an "alert" email when someone logs in to your server (or workstation) by taking two steps*. Now if you prefer to send the alert to your smart phone instead of your inbox, you can easily apply what wikipedia has to say regarding text-to-sms gateway addresses after you finish reading this post.