3 ms·
The interesting thing about PowerShell is that you're not piping really streams of text but COM objects. In a Windows environment this is pretty slick. To give
by gaius 17y ago
The interesting thing about PowerShell is that you're not piping really streams of text but COM objects. In a Windows environment this is pretty slick. To give an example, in a traditional shell, you'd run a command, it would do whatever it does, format it for output, then you would unformat it with awk or whatever so you could use it. In PowerShell, you get it structured, eg it's
mycommand2 `mycommand |awk '{print $2}'`
vs
mycommand|mycommand2 $_.myproperty
Which is more readable? Which survives mycommand being enhanced with another column of output? It doesn't make sense to use PowerShell on Unix because none of the existing commands emit C structs, there's no way to get the output of ps as struct after the pipe.