Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Powershell, isn't bash, but it's pretty kick ass.

Instead of piping text from one command to the other, you pipe entire objects back and forth. A lot of bash commands are aliased to Powershell commandlets out of the box. And, as of Powershell 2.0, you have remote scripting similar to SSH.

I choose to do Python Web development on Windows, and I spend my whole day on the PS command line, and I'm really pleased.

http://en.wikipedia.org/wiki/Windows_PowerShell



> And, as of Powershell 2.0, you have remote scripting similar to SSH.

What, instead of actually using the ubiquitous, widely installed SSH? Some things don't seem to change.


That's my problem with PowerShell. No matter how good it may be, I don't really feel like relearning everything just to accomplish the same things, only on Windows instead.


I'm right there with you not wanting to learn a new shell, however PS is written against the .NET Windows API. The new stuff you'd have to learn would be Windows specific, sort of like learning AppleScript. Also, PS has traditional unix shell commands built in now, like grep and ls.


Are you sure you are in the right business if you don't like relearning?


Yes, throw away everything you know every now and then, instead of building knowledge on top of knowledge.

That will get you far, right?


Who says you have to throw away everything you know? I don't magically stop knowing C++ when running around in Ruby or SQL.


I like relearning. I don't have much use for re-learning... I'd rather learn to do something new. The "to accomplish the same things, only on Windows instead" is the crucial qualifier. I'd rather spend my time, I don't know - learning to configure nginx or doing Haskell tutorials than learn someone's proprietary shell, given that shells aren't particularly exciting and I already know enough about the shells that every other platform offers to be satisifed.


Learning new stuff is cool. Relearning same old stuff in different clothing because someone decided to do something differently is not cool.


PS is substantially different enough that I don't mind, though.


I like PS, but my main issue with it is that it's really slow.


How does that whole "pipe entire objects back and forth" thing work? I mean it seems that there must be some huge machinery to facilitate that kind of thing. For example, if I pipe object from my program to another, how does the other program know what to expect? It must have some sort of type information available, which imposes some pre-planning.

Also, when I pipe an object to another program, can the receiver call methods on it and are the changes visible to the sender?


I'm not sure how they do it and I've only used the basic features of powershell. That said, commands in powershell are .NET classes that define a method ProcessRecord. Inside this they can call WriteObject to write an object to the output stream. So it seems that they can just implement this without any parsing by passing objects around in the .NET runtime.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: