3 ms·
> 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 "s
by jstanley 7y ago
> 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'
- athrun 7y agoIt'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)".