Monday, August 6, 2007

Chomp, Hashes, and Regexes

I am still working through my perl book. I was having trouble working through the exercises and I thought it was because I didn't understand how hashes work. However it was actually because I forgot to use chomp when saving standard input to a variable. I am embarassed to say that it set me back a few hours but I won't forget to check if I used chomp any time soon.

I am working through the subroutine chapter. Perl subroutines are pretty much just like VB subroutines as far as I remember. I am excited because the next chapter is regex. regex is why I chose to learn perl. I read somewhere that perl came from sed. My first chance to use regex was when the dev team needed a wildcard email address scheme. While I didn't create the alias file to translate the dummy email address. I implimented it. It isn't as hard as it looks. When you get past the escape character (\) regular expressions stop looking cryptic.

Powered by ScribeFire.

Friday, August 3, 2007

RHCE, Perl and stuff

Lately I have been focusing on the Red Hat exam. I am currently setting up a network install at home. However, I am working through an older book. I'm not sure how big the difference is between Red Hat Enterprise Linux 3 and 4 (The book is on 3). I am pretty sure the basic tools are the same. Perhaps I can convince my bosses to pay for my training.
Today I found the search and replace string for vi. %s/stringtofind/replacementstring/g. I googled it. That and its variations should help me when it am working through config files in the future.
While I had been scripting in bash, I picked up an online class that fell through the cracks before. I finished the class, but it didn't exactly give me the interactive exposure to the language that I need to learn it. Anyway, I picked up a book called “Beginning Perl” by James Lee. I would have chosen the O'reilly book but “Beginning Perl” seemed to be more hands on.
It includes chapters on both working with files and data, and working with the operating system. I feel like I will learn more with this this way. I just finished the section on arrays and am moving into hashes and regular expressions. Because my plate is full. I will probably spend less time on MythTV but I will be working on scripts more as there are plenty of things that need to be automated at the office.

Powered by ScribeFire.

Wednesday, July 4, 2007

List of upcoming projects

These are the projects over the next few weeks:

I am going to go over snort in extreme detail. While installing I found that there are several modules that may or may not be useful to me. I will go over these one at a time.

I bought two television cards and stuck them in one of my boxes and unfortunately I found out that they are incompatible with my Digital Cable. I will start from scratch with a new operating system and then I will find workarounds (I will have to use my current cable set top box and I will have to find another one.)

Log Navigating Script: I will write a log navigator that will list all errors with the number of times they have occurred. I will also include the ability to list all individual errors with all error output. This should give errors the visibility they need. Currently I have found that log data for the application servers at work is too immense and grepping log files doesn't provide me with the perspective I need to decide what errors are interesting enough to show the developers.

Powered by ScribeFire.