Google said perl -le 'print "It\047s True";' But after playing around for a while I found this worked: perl -le 'print "It''\'\''s True";' Thats double quote It single quote singlequote backslash singlequote backslash singlequote singlequote s True double quote 🙂...
IT Tips
Perl system() call return results
Just been trying to create a Perl script to run ping and return results #!/usr/bin/perl use strict; # this is a heap of notes to try and come to grips with Perl # a bit better. # # Looks at how the system() call works # # How to build the command arguments to get #...
I want my At jobs to have a nice name – Use Schtasks
I used at to create a scheduled task that ran at 9:02 every week day: at 09:02 /every:m,t,w,th,f C:\path\to\my\batchfile.bat However when looking at the task in the scheduled tasks control panel all you see is At<id number of at job> e.g. At1. I wanted a nice...
Get the nth line of a text file using Windows Batch Scripting
This is something I just made up to parse a csv file and return a specific value from the first content line (line 2) and the last line of the file. The purpose for it was to get that information and then format a new filename of...
Zenwalk 5.2
Just looking at Zenwalk. If it wasn't for my requirement to run VMWare Server without the hassle to compile non-vm patches to get it working. I would probably use Zenwalk as my primary desktop system. Nice things: XFCE: lighter than Gnome but just as pretty. Zenpanel:...
loop no! ==> vmware-loop no! ==> vmware-mount yes!
I read an article in Linux magazine. Which said that you can mount vmware images with this command: mount -o loop,offset=32256 vmware-disk-image.vmdk /mountpoint mount: you must specify the filesystem type As you can see my Ubuntu 8.04 system didn't seem to like it...
Internet Explorer 7 Cookies
Internet Explorer 7 doesn't seem to like the max-age= way of defining cookie aging. It doesn't like this (i.e. no persistent cookie is created): document.cookie = cookieName + "=" + cookieValue + "; max-age=" + (60*60*24*365) ; // 1 year in seconds But does like this:...
XML Format Test
A string of XML: Text Node Send it through xmllint: echo ' Text Node ' | xmllint --format - Output from xmllint: Text Node
WP-Syntax Plugin
I have been attempting to use the <pre> tag to simply copy and paste information into WordPress but the result has been that it doesn't accept all the whitespace as being whitespace. Anyway I installed WP-Syntax plugin and attempted to insert some code and it...
Scripting SNMPGet.exe using VBScript
Every month I have to submit page counts to our printer supplier. Usually it involves connecting to each printers administration webpage counting up the different totals (black/white, colour) and then sending that back to them. Here is a VBScript function that calls...
