Complete Projects:
Build, test, and secure DNS server.
Build webserver with vhosts for production.
Build mail server for production.
Spam filter for comments section of website.
Pipelined Projects:
Perl module for DNS.
Build box for LAN gateway.
|
One such example of this happened to me while on a customers site and dealing with someone from a competitor company who was trying to outsmart me. I was relying heavily on a flat text file that was being sent to our equipment for parsing, in short I needed to write some macros for this to work effectively - this was dependant on the text that I was recieving which should never have changed.
The customer supplied me with a whole lot of garbage text for the macros and I needed to sort the garbage from the good. I knew the deliminating word that would help with this, it was xray - anything without the text xray didnt mean anything and was irrelevant. I quickly hopped onto a shell and typed the following command:
-bash-2.05b$ grep xray ~/xrayfile.txt > ~/xrayfilegood.txt
Lets break this down,
grep then returns all the lines that contain the string xray in the file xrayfile.txt
(the tilde ~ is a shortcut for your home directory, hence ~/xrayfile.txt would be /home/user_name/xrayfile.txt).
We then redirect > this output into the xrayfilegood.txt.
The result was a new text file called xrayfilegood.txt which resided in my home directory, within this file all the text that I needed to make my macros. Easy as that!
The raw power of redirecting text emerged the next day when a person from a competitor company was working on his system that sent the flat file of text to our equipment, not knowing that I knew the power of redirecting he changed the text coming into our workstation thus rendering the macros that I had made useless.
A quick return to the command line to redirect some more text and I was home free to quickly set up some new macros and return our system back to a working state! Moral of the story is, never mess with a person that knows how to redirect!
Dave,
Copyright shintara.net - 09/09/2006
Information that may interest you Shintara.net's content both visually and written is copyright 1997-2006 and has rights reserved under guidance of the Creative Commons license. Contact me for more information. |