I have a system that runs different Perl scripts and I would like to intercept certain parameters of these scripts and pass them to my custom shell script.
This is what I have:
#!/usr/bin/microperl
[...]
if ($number) {
if (&number_is_b($number)) {
system("touch $STATE_LOCKED1");
print 1;
}
else {
system("/script/myscript.sh $number");
print 2;
}
}
else {
[...]
}
What I have added is the
system("/script/myscript.sh $number");
That calls the following shell script passing the parameter $number
:
#!/bin/sh
result=$(wget -qO- http://x.x.x.x/result?qs=$1)
[...]
Now everything works fine, but I would like the original Perl script to proceed without waiting for the result of the shell script because the wget
can take time. I need the Perl script to proceed autonomously without caring whether the shell completed successfully or not.
Is it possible to make it launch and some how forget about it and go on?
Do you have any suggestion on how I can do that?