Catch up on stories from the past week (and beyond) at the Slashdot story archive


Forgot your password?
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. ×

Comment Re:It would be good to have optional GUI (Score 1) 780

You should learn more about what you're mocking. The long names are for scripts and people learning to use the shell.

Get-ChildItem -Path $home | Where-Object -FilterScript { $_.Length -gt 2KB }


ls $home | ?{ $_.Length -gt 2KB }

In v3.0, it gets shorter because you don't need the { } or the $_ for the filter expression. So it's more like this:

ls $home | ? Length -gt 2KB

I won't try to claim it's perfect because it's not, but it's better than Bash (though it owes most of its heritage to Bash et al) because you don't have to drop in awk and sed commands to parse the output of the last command in the pipeline. Though pointing that out will probably get me flamed.


Comment Re:OO shell is a POS (Score 1) 780

PowerShell has the concept of pipes, and takes them a bit further than *nix because the stuff that moves along the pipeline is an object. You don't need to parse it, because you can query against its properties. Get-Process | Sort-Object -desc cpu | Select-Object -First 10 Get a list of processes, sort by the CPU property on each one, then get the first 10 in the list

Slashdot Top Deals

"We shall reach greater and greater platitudes of achievement." -- Richard J. Daley