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

> You could do that, but the way to write it in the bash way would be `dir | select -first 3`

I would have said "ls | head -n3" as well. I've never heard of "select". I just tried your suggestion and it doesn't appear to work:

    $ dir | select -first 3
    bash: syntax error near unexpected token `3'


It's because it's a PowerShell syntax. What the parent meant was "here's how to write it in PowerShell so that it still has a 'unix' feel to it (ie: composing commands with pipes and option switches)".




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

Search: