I believe /dev/fd/63 is a pipe rather than a temp file, but I'd have to go double-check. Still, probably less confusing in a one-minute intro to just call it a temp file. I've used this technique to redirect varnish logs to /bin/logger, so I could slice-and-dice them using rsyslog. Super cool.
@dritterregenschirm23249 ай бұрын
Good to know!
@orizach019 ай бұрын
I never knew the 2nd one, thanks!
@RayChavez9 ай бұрын
You’re welcome, my pleasure!
@hotfix_cowboy9 ай бұрын
What is an example of when you prefer using one vs the other? Thanks!
@RayChavez9 ай бұрын
As demonstrated in the video, and *in general*, when you want the output directly placed on the command line, use command substitution. If you need the output placed into a file first, THEN reference that file, use process substitution. If you want a more "advanced example", see my video "How to Read Git Diff Output", timestamp 3 minutes, and 23 seconds. kzbin.info/www/bejne/hYi2kHiKnNV_fLMsi=48c74V_qjRdEqLHD&t=203 Great question btw! 🫡