Category: Scripting
VI global search and replace
In case you need to search and replace text globally within vi, here’s the command to do so: :1,$s/old/new vi is a free software screen-oriented text editor computer program written by Bill Joy in 1976 for an early BSD release. Peace! \m/
Free Windows PowerShell course book
The Schweizer IT Professional and TechNet Blog is sharing a free Windows PowerShell course book that they’ve translated to English. The book seems to be pretty good. From their blog entry: Due to its great popularity, we have decided to translate the Windows PowerShell course book to English. So if your mother tongue is not…
Accessing specific event logs on a remote server
An old friend and classmate of mine, Zahid Faisal, wanted to know how to access/read event logs on a remote server using Windows PowerShell. I thought it was an interesting challenge, so after some research and playing around I found that you can make use of the WMI objects to do this. Follow along to…
Try Ruby online
Ruby has been getting a lot of praise for a while now, so I decided to give it a try. I was surprised to find so many resources already out there, and one I think worth mentioning is this website. Ruby is a programming language from Japan (available at ruby-lang.org) which is revolutionizing the web.…
Put your Mac to sleep via e-mail
You’re at work, with no remote control access/capability to your Mac at home, brown-outs are occurring, and you forgot to plug it into a power strip due to some unknown reason last night. What do you do? Well, read on… With some preparation, you can take advantage of Apple’s Mail‘s rules feature to run an AppleScript…
Windows PowerShell script to check for specific hotfix
I was asked by our IT department to write something that would check if a specific Windows Update hotfix was installed on a number of servers (they gave me list), and they wanted it ASAP. So, I thought, hmm…this is the perfect opportunity to give Microsoft’s new scripting tool, Windows PowerShell, a try. I tip…