Fun with shell scripting
I went a little nuts tonight with shell scripting. It started off with a few innocent bits of cat
and grep
piped together. But then I invited trouble started using sed
. Pretty soon, I was bringing in cut
and sort
and uniq
. I knew I was doomed when I made the whole mess start emailing me with sendmail
.
Oh, but then I went completely off the deep end. I looked up RSS 3.0, since that's so much easier to generate on the fly. I started producing that with a little help from echo
and awk
. From there, I whipped up a quick v3.0 to v0.91 converter so I could get something my aggregator could understand.
It was all a very iterative process down a slippery slope of geekiness, and the resulting scripts are nothing that I'd've designed as such from scratch. But, one thing led to another, and now I've got a nightly report emailed to me of pages that have gone 404 and 500, and an RSS feed of referers to boot.
I'm sure it looks like completely braindead work, but it was fun!
Archived Comments