Comments on: Scripting Windows the Unix Way http://www.terminally-incoherent.com/blog/2012/05/14/scripting-windows-the-unix-way/ I will not fix your computer. Tue, 04 Aug 2020 22:34:33 +0000 hourly 1 https://wordpress.org/?v=4.7.26 By: Ron http://www.terminally-incoherent.com/blog/2012/05/14/scripting-windows-the-unix-way/#comment-22277 Sun, 27 May 2012 08:48:47 +0000 http://www.terminally-incoherent.com/blog/?p=12050#comment-22277

If by users you mean the people who’s machines you manage for work, why not include the tools as part of a ‘standard company install’, thou the click and run works well for some people.

Ideally you would have ssh and cygwin on all the machines, and you could ‘magically’ fix everything, bar network issues

Reply  |  Quote
]]>
By: Luke Maciak http://www.terminally-incoherent.com/blog/2012/05/14/scripting-windows-the-unix-way/#comment-22227 Sat, 19 May 2012 18:28:58 +0000 http://www.terminally-incoherent.com/blog/?p=12050#comment-22227

@ STop:

Nice! I didn’t know this existed. Will have to check it out. Thank you sir!

Reply  |  Quote
]]>
By: STop http://www.terminally-incoherent.com/blog/2012/05/14/scripting-windows-the-unix-way/#comment-22224 Sat, 19 May 2012 11:06:59 +0000 http://www.terminally-incoherent.com/blog/?p=12050#comment-22224

You could also try Gow (Gnu On Windows) which basically is a one-click installer that will install all dependencies, take care of PATH, etc.
You might find it more bloated (it even includes Vim for the cmd console!) but it’s still under 6 MB…

Reply  |  Quote
]]>
By: Sehro http://www.terminally-incoherent.com/blog/2012/05/14/scripting-windows-the-unix-way/#comment-22195 Thu, 17 May 2012 18:52:16 +0000 http://www.terminally-incoherent.com/blog/?p=12050#comment-22195

Sadly, UnixUtils doesn’t have ex in their package (I just checked). Still very useful tho.

I dunno if you’ve checked that poll lately, but from what I can see, WinRAR is no longer the winner.

Reply  |  Quote
]]>
By: Luke Maciak http://www.terminally-incoherent.com/blog/2012/05/14/scripting-windows-the-unix-way/#comment-22186 Wed, 16 May 2012 15:41:31 +0000 http://www.terminally-incoherent.com/blog/?p=12050#comment-22186

@ ths:

Yeah, I could. I’m actually not sure if UnixUtils has ex in their package, but chances are they do. :)

@ Luchs:

Yeah, JScript is an option but it is similarly verbose.

@ Chris Wellons:

Well, the self-extracting bit turns it into an exe anyway so it doesn’t matter – user does not need zip or rar installed for it to work. I believe 7zip has the exact same functionality. :)

Reply  |  Quote
]]>
By: Chris Wellons http://www.terminally-incoherent.com/blog/2012/05/14/scripting-windows-the-unix-way/#comment-22185 Wed, 16 May 2012 15:27:55 +0000 http://www.terminally-incoherent.com/blog/?p=12050#comment-22185

Thanks, this is a clever idea, so I’ve added it to my virtual toolbelt (mentally). Though I’ll use a self-extracting zip rather than rar.

Reply  |  Quote
]]>
By: Luchs http://www.terminally-incoherent.com/blog/2012/05/14/scripting-windows-the-unix-way/#comment-22176 Mon, 14 May 2012 20:35:36 +0000 http://www.terminally-incoherent.com/blog/?p=12050#comment-22176

Isn’t JScript also available as a replacement for VBScript? It probably wouldn’t help much, as you’d have to use the same objects for doing stuff, but it would at least support regular expressions.

Reply  |  Quote
]]>
By: ths http://www.terminally-incoherent.com/blog/2012/05/14/scripting-windows-the-unix-way/#comment-22172 Mon, 14 May 2012 15:11:37 +0000 http://www.terminally-incoherent.com/blog/?p=12050#comment-22172

I like regexes very much and usually sed is convenient, but if you need to do inplace editing I’d rather prefer perl -i -p -e ‘…’ or the old ex editor
ex -s \
-c "set ic|%s/User nobody/User ${httpRunUser}/g|wq" \
${ihsConfigDir}/${PROFILE}_httpd.conf

this example will replace the user in a httpd.conf inplace.

Reply  |  Quote
]]>