3 ms·
curl and ps are both aliases in powershell for their respective posh equivalents. For some reason grep isn't though, I'll give you that. It also has positional
by Reasoning 2y ago
curl and ps are both aliases in powershell for their respective posh equivalents. For some reason grep isn't though, I'll give you that.
It also has positional parameters meaning you don't have to specify parameter names, though you might as well because tab completion is a thing. And if you're really keen on not using tab completion, it autocompletes parameter names for you meaning "get-help man -e" is equivalent to "get-help man -examples".
Here are less verbose posh commands for your examples.
(curl http://localhost:555/log -useb | select content | sls "2025[0-9-]+" -a).select.matches
Still arguably a mess. Select-string not having a -o equivalent parameter is a big gripe of mine.
(gps ffmpeg) or (ps ffmpeg)
Get-Process has a name parameter. Why not use it?
Edit:
I should have added, curl ships with Windows now so a farer comparison would be a select-string on curl.exe.