3 ms·
Does an OS/terminal/shell exist that allows one to apply a different interpretation to streams than as a stream of characters? For example JSON objects, or even
by amelius 8y ago
Does an OS/terminal/shell exist that allows one to apply a different interpretation to streams than as a stream of characters? For example JSON objects, or even images?
Not sure how useful it would be, but it could look like this:
$ cat car.png | grep "traffic-light"
Illegal operation: stream is of type image
$ cat car.png
(image appears)
- detaro 8y agoPowershell does pipelining with streams of objects instead of only characters.
- TheCycoONE 8y agoUnfortunately it comes with risks. With byte streams you can have an arbitrary max buffer size after which the program has to wait to write. With objects you can run out of memory trying to pass everything in a single object. I hit this trying to generate large CSVs in powershell.
- deleted 8y ago[deleted]
- the_pwner224 8y agoI've heard MS PowerShell does this.
- jtokoph 8y agoiTerm2 kinda has the image option, but it's not a cat overload. https://www.iterm2.com/documentation-images.html https://www.iterm2.com/documentation-images.html