|
|
|
|
|
by hnlmorg
1938 days ago
|
|
murex breaks POSIX compliance massively because it acts as a proxy between each command in the pipeline. This means it can forward type information to processes within murex (eg builtins) but read and write byte streams to external commands. As mentioned to one of your other replies, this causes a few issues (eg forking). But processes are still run in parallel like with a traditional shell and 99% of time this massive cheat is transparent to both the running processes and the users too. This cheat does allow for some additional features though, like - colourisation of STDERR (so it stands out) - STDERR byte count used to judge if a process has failed (possibly a few others I've forgotten but have to dash now for a lockdown Zoom party....sorry) |
|
In the following example, 'choco' (Chocolatey) outputs a list of outdated packages in a consistent format (--limit-output). The text output is piped to the ConvertFrom-CSV PowerShell CmdLet, which maps the text output from choco into a PowerShell object.
```ps1 choco outdated --limit-output | ConvertFrom-csv -Delimiter '|' -Header 'name','version','v-new','pin' ```
For what it's worth, STDERR is already colorized in PowerShell too.