Re:From macOS to Windows and WSL
by AnIdiotOnTheNet on Friday December 07, 2018 @12:27PM
(#18629544)
> I think a lot of people using object pipelines miss the major point of designing test pipelines which is the first step is to make your pipeline easily parseable.
And if developers of UNIX tools actually did that then maybe object pipelines wouldn't be nearly as appealing as they are, but we don't live in that timeline.
I use jq a lot in bash. That's a good part of an object pipeline.
curl | jq | grep/awk | jq | curl
Yeah but ip, and ls, and cat /etc/somefile.conf, and pretty much anything asides from curl don't output structured data so you can't use jq on it.
That was just an example of a pipeline. jq can parse plain text easily with split/map as well.
Also:
ls -l
ip -o
Powershell is amazingly consistent for sure but each little bit of consistency has numerous inconsistencies in it which aren't exactly stable, hence the whole web request nightmare. Also things like different methods of getting the date return timezone and non timezone aware things. They nearly had it but rushed it out of the door. Also things like WinRM are totally unreliable and don't scale well due to the runtime performance being dire (try arguing with ansible/WinRM failures on a daily basis).
I think a lot of people using object pipelines miss the major point of designing test pipelines which is the first step is to make your pipeline easily parseable. So for example dates as unix dates, colon separated etc. Then you don't need to use regex and stuff. For that little bit of compromise first you end up with something which is several orders of magnitude faster than the UTF-16 and serialisation backed powershell pipelines. Try grepping a few gig of data with it :)
On your last point, you're lucky. This comes up a lot in corporate networks and proxies and occasionally randomly out of the blue.