January 29, 2010
I remember back when I was first learning Linux, and I encountered shell scripts. I wasn’t a programmer, and I didn’t “get” it. I distinctly remember thinking, “well, THAT’S something I won’t have to learn”. Ha!
As it turns out, I was incorrect. Writing scripts is an essential skill for a system administrator. In Linux/Unix, we’re blessed to have an amazing development environment, where as administrators running on Windows had to make due with batch files until the dot net revolution came along to introduce ASP and VB script. Now, with powershell, they’ve actually got a great environment to write systems scripts in. Between that and things like Windows Server Core, I’m beginning to wonder about the Redmond camp. But I’m digressing…
Writing scripts isn’t an optional tool in an effective administrator’s tool belt. It’s absolutely vital to efficiently performing many, many tasks. Personally, I use the bash shell, because it’s the default, and it’s what I started on. You should use whatever you feel comfortable with, whether it’s a shell script or perl. Heck, I’ve been desperate enough to even do a couple of things in CLI-mode PHP, just because I’m more fluent in it than I am perl (which is a shame, and something I’m going to be working on rectifying).
My last “fun” bit of shell programming was probably a cron job that checked for a new tsunami warning and emailed me the text of the alert. Before that, I wrote an entire RSS reader in bash. With bookmark support. Yeah, I’m a sick man.
What kind of fun things have you done with scripts lately?