Windows Command Line Ping Replacement
So the windows version of ping is really stupid.
I was writing a batch script to mount up a network share that involved checking to ensure my NAS unit was turned on. The script is scheduled to run after the computer resumes.
What I found out is that the built in version of Ping.exe is terrible at telling you whether the ping has returned successfully or not. I was checking the ERRORLEVEL – %ERRORLEVEL% variable to find out what ping was returning. It should be 0 for success and 1 or higher for a failure.
What I found was, i was getting replies from the local pc (dunno why, leave me a comment if you know) and ping was reporting a success even though the correct pc failed to reply. The solution?
Replace the Windows ping.exe with Fping. It has a lot more options and appears – from some initial quick tests – to correctly report the errorlevel.
Kudos to Wouter Dhondt for developing it. I’ll update this post with any more news!
Fping vs Ping errorlevel return values
Hancock, Books and photographs
Hancock
I went and saw this film with my brother and a couple of mates today. Was good, up to a point. Certainly, Will Smith is getting better – he appeared to play the part flawlessly, at a level I’ve not seen him act at before.
My one, slight moan, is that they included a brief, guarded and pointless sex scene. I guess, it *may* have been included to make a point, but it felt more like a box-tick exercise than anything else. Apart from that, an enjoyable way to while away a bit of time.
Books
Books, I finished a Colin Forbes book this week. Awful. I had to put it down mid-way, and read a completely different book as a break before I picked up again. It felt so rough! And to think, I used to like his books. Fit his usual formula to a T, felt contrived, with a few instances of what PBEM RPG players call “SuperHero Syndrome“. In a Matthew Reily book, I can forgive SuperHero syndrome: he does it with such flair! However, it is not forgiveable in a Colin Forbes book. Which is a shame.
I started to read a Clive Cussler book “Dark Watch” a few weeks back. I got half way through, an OK book, till I got to a line of pure placement advertisement, which put me off completely and utterly. Here’s an extract. (For the copyright fiends out there, this is fair use!)
“Juan found a parking spot a few blocks from the court and spent the next two hours walking the neighborhood, sipping black coffee from a Starbucks. He felt he should have bought his coffee from a local vendor instead of an international franchise, but it had been months since he’d had a taste of his favourite brew. He made a mental note to contact the company’s Seattle headquarters and see if it was possible to buy their special equipment for the Oregon.” [Oregon is the wet-merc ship he captains.]
Oh dear. What an abysmal excuse for an advert. At the very least, it could have been subtle! Stopping at “it had been months..” would have been fine. I have stopped reading the book. I’ll finish it sometime, but not yet. When I’m not so irritated at that advert. At least on the web, it is generally fairly easy to spot, and ignore, them. A bit harder to when you’re engrossed in a story.
Photographs
I’ve been trying to use F-Spot on my laptop to manage photos. Unfortionately, it has a nasty habit of freezing my laptop totally, when I click “OK” on certain dialog boxes. Quite frustrating. So, another question for those reading, what image management software would you recommend ? It has to run nativly on Ubuntu Hardy, but apart from that, pick whatever you like (including web-software). I have a large collection of photos (my camera’s counter recently went over the 1,000 mark), which I want to tag and organise. An effective search function is a must, so that I can add relevant photos to my blogs from my collections.