by shortrounddev2 · 3y ago · 0 comments
File path names are bytestrings on most OSes, so you have undefined behaviour if your pipeline can't handle that.
Powershell's structured data can cause issues if you expect it to be similar to Unix-like shells.
For example, Powershell mangles piped binary data by default:
https://brianreiter.org/2010/01/29/powershells-object-pipeli...
Correct handling of piped binary data requires additional flags:
https://stackoverflow.com/questions/54086430/how-to-pipe-bin...
Exactly. It means that system administrators need to be aware of the differences when working with Powershell versus other shells to avoid silent corruption of binary data.
And Python can cause issues if you expect it to be similar to Java. They're 2 different tools, so if you expect it to behave similarly to bash, that's on you
Is this a No True Scotsman?
Get-Process | Out-Host -Paging | Format-List
Case sensitive hyphenated compound word commands?
> Case sensitive
they're not
Also your command is equivalent to:
ps | oh -paging | fl
It is idiomatic to capitalize liberally though.
That's actually something I have come to appreciate about Powershell is that idiomatic distinction concept that scripts are more likely to be read by other people (including Future You with no memory of having written the script in the first place) and to write "full sentences" for an audience, but feel free to be fast and loose in the REPL all you want.