files might be faster, because you can mmap them?
When using jq, I can do a lot of things:
aws s3 cp s3://bucket/file.json.gz - | zcat | head | jq .field | sortThat's how Go's static file web server works. It serves streams, but if you happen to io.Copy to that stream with something that is also an ∗os.File on Linux, it can use the sendfile call in the kernel instead. (A downside of making it so transparent is that if you wrap that stream with something you may not realize that you've wrecked the optimization because it no longer unwraps to an ∗os.File but whatever your wrapper is, but, well, nothing's perfect.)
jq .field <(aws s3 cp s3://bucket/file.json.gz - | zcat | head) | sort
which is more annoying to type but works.So, this should work :-)
% cat /proc/self/cmdline <(echo $SHELL) | tr '\0' ' '
cat /proc/self/cmdline /proc/self/fd/11 /bin/zshIt won't work in dash though, and you should not use this in a shell that targets POSIX.