Y
Hacker News
new
|
ask
|
show
|
jobs
by
vic20forever
2247 days ago
>You could do that, but the way to write it in the bash way would be `dir | select -first 3`
Fyi, `dir | select -first 3` also works in PowerShell.
1 comments
athrun
2247 days ago
Yes, this is what the parent meant: it is valid PowerShell. It wouldn't work by default in Bash unless you had `dir` and `select` defined there somehow.
link
jstanley
2247 days ago
"dir" is commonly available on Linux and "select" is a bash built-in, which is probably why so many of us were confused by the comment :)
link