|XP is just a number
Re^2: wrapping bash and astronomyby Aldebaran (Curate)
|on Mar 02, 2023 at 10:12 UTC
The usage is systemx("some_command",@args);. So: my $s1 = capturex 'set', '-eu'; The difference being that command and subsequent arguments must all be passed individually and not in one single string. The way you are calling it, it thinks that the whole string is one single command (and it complains it can't find it).
Ok, so it's clear now that have to tell it to find bash:
I got a strong result with wrapping 2.create.bash, which I think is a nifty little utility for my nomenclature scheme.
HOWEVER! I assume that capturex, systemx and friends spawn a system command directly or via an ephemeral shell which ends as soon as the shell command ends. This means that a sequence of capturex calls will use completely different shells, which will not share any state. So, setting shell options via set -eu on one capturex call will not be preserved on the next capturex call. If you want to preserve state in a shell and execute many shell commands in it there is a simple way: first create a temporary shell script (see tempfile of File::Temp) within your perl-script to contain all the commands you want to run. And then execute this shell script via a single capturex call.
I'm trying to follow, and I have a script to that end:
Output. I can't figure out why the shebang and comments endure:
Question: How is my regex not sieving out the comments? Do you see what I'm trying to pull off here?Aldebaran++ I have to commend your efforts not only in using Perl but also in using Linux. It's a steep learning curve but it hides a ... springboard at the end of it. Plus the methodical approach you take in achieving your aims.
Woo-hoo, a springboard! If the board is at the height of Skylla, and extends to the center of Charybdis, how long does one fall until impact?