I'm interested to learn the backstory behind this question. What real world problem are you trying to solve? Since you mention Cygwin, is your code required to run on both Windows and Unix?
I ask because I've spent most of my life avoiding the shell by writing everything in Perl, as indicated at:
From the many references in these two nodes, these two are mandatory reading:
👁️🍾👍🦟
In reply to Re: Using Perl's open() to investigate bash login environment
by eyepopslikeamosquito
in thread Using Perl's open() to investigate bash login environment
by Intrepid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |