Skip to main content
8 events
when toggle format what by license comment
Aug 20, 2020 at 9:42 comment added clapas Nevermind. I found out myself with this command: echo "$(ls -l /proc/self/fd)". I can see fd 1 points to a pipe.
Aug 20, 2020 at 2:20 comment added G-Man Says 'Reinstate Monica' @clapas:  Well, technically, I don’t.  But what, exactly, are you asking?  Do you understand Command Substitution?
Aug 19, 2020 at 12:55 comment added clapas Hey, how do you know that child_prog will be invoked with file descriptor 1 pointing to a pipe?
Aug 17, 2020 at 13:04 comment added hbogert Yes, as you said, <() is a bash feature, so in the case you are not running Bash, you can resort to eval. Further, sourcing a dynamically generated script is pretty much eval.
Aug 17, 2020 at 12:56 comment added G-Man Says 'Reinstate Monica' @hbogert: And you could fly a kite during a thunderstorm, but why would you want to? Seriously, can you describe a realistic, practical example of something you could do with eval that you can’t do with my answer as written?  eval is like a chainsaw; it is good for some things, but you should think long and hard before you use it.
Aug 17, 2020 at 12:35 comment added hbogert you could use eval as well
Jun 23, 2017 at 1:23 history edited G-Man Says 'Reinstate Monica' CC BY-SA 3.0
Added a thought; fixed typos.
Jun 22, 2017 at 9:47 history answered G-Man Says 'Reinstate Monica' CC BY-SA 3.0