PowerShell NOT inferior to Cygwin

In a previous post, I kinda outed myself as a lover of “find | xargs” and grep. It seems that I inadvertantly gave offence to Jeffrey Snover (the architect of powershell), for whom I have great respect. So I thought I ought to set the record straight.

I like powershell a lot, and I suspect that it was familiarity with Unix that drove me back to Cygwin. I was truly inspired by the Channel9 interview that Jeffrey Snover gave. I had a few problems with the way that Cygwin handled NT file security settings, that caused me no end of grief. So I was more than happy to take powershell for a spin.  I think the idea of having an object pipeline is serendipitous, and I particularly like the fact that I am dealing with the .NET framework. I’ve been working with that for years so I don’t have a huge learning curve to ascend in that regard.

Funnily enough, the reason I struggled is apropos to what I was discussing in the original post – a relative lack of documentation. I like to be able to read around a topic. To get a lot of people’s ideas. I initially found it hard to get started – I didn’t have a sense, at times, of the capabilities of powershell, and where I should turn to for things that I knew how to do in bash. I was tryinig out the beta version of monad which was a while back, so things may have changed. I have to try again.

Another reason why I opted to go back to cygwin – I get pretty much all of the mainstream Gnu utilities for free. It didn’t occur to me that with a little fiddling I could have the best of both worlds by accessing Cygwin from within powershell. I haven’t tried it yet, but once I have, I shall report back with instructions.


5 thoughts on “PowerShell NOT inferior to Cygwin

  1. I played with PowerShell for a bit, and hated it almost immediately. A large portion of my loathing is aimed not at PowerShell per se but at the decaying-heap-of-mold console Window it lives in: rectangular selections suck a big one, as does the buffer management approach, and I can’t scroll back through the buffer without the mouse (insanely frustrating). Scrolling is about ten times slower than rxvt (As an aside, I can’t figure out why ls -l */*/* generates five times more lines than dir */*/* from the same directory). PowerShell is totally broken inside rxvt, so I’m guessing ssh is out of the question (ironically, cmd works in both).

    Sans a few minor improvements, command editing seems to be stuck in the dark ages. It remains many long years behind bash. No dircolors either!

    Is there anything resembling ‘which’? Of course adding cygwin to the path helps: which cmd => /cygdrive/c/WINDOWS/system32/cmd … very pretty! Is there anything like history expansions (!$, !*, !!)? What about command substitution (ls -l `which ls`)?

    The most egregious omission is the total absence of background jobs (not to mention nohup). I seriously hope I’m wrong on this one.

    I’m sure there is a lot of good stuff in PowerShell, but it’s completely useless if I have to throw out almost everything in a shell that makes me productive. This tool has a long, long way to go.

  2. That’s a very good set of points. Maybe that was another reason I abandoned powershell?

    I can’t help thinking that if you came from a powershell background, you would castigate bash for using a text-only pipeline. ;^}

  3. Maybe, maybe not. We often fail to realise how vital a new technology is until long after we become heavily dependent on it (e.g., mobile phones and the internet).

    But all the whizzbang goodies in the world won’t help if PowerShell doesn’t assist the transition with some basic essentials. Would mobile phones have taken off if they couldn’t phone home?

    I am a big believer in good ol’ text (ASCII, even, though I’ll settle for UTF-8), so for the time being I remain unconvinced that PowerShell is in my future.

  4. The paradoxical thing(s) about Microsoft PowerShell, is that:

    – It has many alias(es) for compatability with Unix & unix like Shell commands, but, it has not backward compatability with MS-DOS commands !!!
    If you can recognise commands like deltree, & the old quasi pipes dir/w , dir/p, dir/w/p etc.

    – The claim that the noun-verb combination is easier: personally, I do not think it’s typist friendly to type Get-ChildItem vs. just typing ls (it’s good an alias is there)

    – It’s much more slower to load than cmd.exe

Comments are closed.

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: