Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

How Can I Modify a Text File and Then Extract Selected Lines From the Modified Contents?

(image) Hey, Scripting Guy! How can I write a script that modifies the contents of a text file and then copies specified lines from the modified contents to a new file?-- EH(image) (image) (image) Hey, EH. There’s no way to do that. Now go away and leave us alone. Wait, sorry; we didn’t mean it. As it turns out, the Scripting Guy who ...

How Can I Get the Uptime of a Service?

(image) Hey, Scripting Guy! How can I get the uptime of a service?-- JC(image) (image) (image) Hey, JC. You know, if you could have seen the Scripting Guy who writes this column this morning you would have reconsidered asking him a question about uptime. Although he woke up in plenty of time, even turning off the alarm before it was due to...