Thursday, October 28, 2004

New Job

I have changed jobs and am now working for SIAC (Securitys Industry Automation Corporation) which means I get to work on the NYSE computer systems. I take a two hour train rid into Brooklyn every day so I have been catching up on quite a lot of reading.

Monday, October 18, 2004

echo "awk isn't hard" | awk '{ print $0 }'

When I first was intersted in Linux and given a Linux book I read it cover to cover. When it got to awk it had just a page or two saying something like: "Awk is Soooo cool it can do *anything*. but we wont cover any of that here, go buy another book." So I didn't bother learning any awk. I mean you can technically do just about everything without awk which is what I did for years. But as the years when buy I read plenty of Linux101 books. Each and every one would barly cover awk and tell me to go and learn it on my own or buy another book. Last week while looking for a way to parse out lines 30-40 in a file I knew I could do it in bash, but someone showed me how to do it in 1 line of awk. Tweaking the script I ran across a website with some more docs on awk. Seeing something I could use I re-wrote another function in a different script I had reducing its runtime from several minutes to just seconds! (probably from all the overhead of calling the dozen different bash mini-apps and piping involved) With that discovery I was hooked. I read the awk online docs, enough to know what it can do so when I want to do something in awk I will know that it can and just have to go back and refure to the doc for the details. So now that I have spent less then a week knowing awk and I find myself wondering why I never learned it before now. Why don't Linux books cover awk? A small chapter could cover a whole lot and get someone started with awk. Maybe the authors themselved don't know awk because they never learned because it was mising from the books they read...

Popular Posts