3 ms·
PowerShell command names, their parameters, string comparison, and regex matching are all not case sensitive, unless you want them to be. It really gets you th
by jodrellblank 4y ago
PowerShell command names, their parameters, string comparison, and regex matching are all not case sensitive, unless you want them to be.
It really gets you that you need to know aliases to keep it short? So why aren't you writing:
du --summarize --human-readable | sort --human-numeric-sort --reverse | sed --expression='10q'
`-exec ls -lt {} +` is not good because -exec is not handled by the shell so it behaves differently to running other commands, because `+` is a nonstandard command terminator, because {} is a nonstandard placeholder and because using `find` to run commands is an onion nobody would guess.
In your terse example, `sort -h` depends on you having run `du -h` to trigger the matching "serialise information to text" and "parse information out of text" that they both need to make that one use work, because there's no separation of content and presentation (like PowerShell has) and no structured data to pass between different commands.
Not only will PowerShell tab-complete the names and the parameters, it will tab complete the properties Length and LastWriteTime because it can tell what objects come out of Get-ChildItem and what their available properties are.
> "Also, again, case-sensitive commands make me mad."
You do understand that du, find, sort, sed are case sensitive commands with case sensitive parameters, right?