I just finished writing the pages for the rest of my new domain – at least for now. I added the lightly populated beckitrue.com home page. That one was easy. It just points to this blog or to my Cisco CCNA teaching site.
I borrowed the style sheet from my DOCSIS site, so I had to do a lot of find / replace. I use vi to write my web pages, so I had to find out how to do it in vi. It turned out to be pretty easy, as it is a regex that I’ve used many, many times in Perl scripts. What was interesting (to me anyway) is how to do it on multiple lines. Here’s how I did it:
.,$s/old/new/g
.,$ means from the first line to the last of a document
s means search & replace
old is what I replaced
new is what I replaced old with
g means globally on any line, not in the whole document as you may think. The .,$ does that.
LinkedIn



