python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
How can I check an exit status of a command?
I have a code snippet:
my @array=("abc","def", "ghi");
print "I am testing exit code\n";
grep /lan/, @array;
if ($?) {
print "status is 0\n";
}...
PPP
Votes: 0
Answers: 1
In Bash, how to capture exit status code from a command nested within a complex statement
I'm relatively new to working with bash. I've inherited this bit of code to run a command via SLURM on an HPC system:
CMD="srun -srunParam1 ... -srunParamN ./scriptToRun.sh -scriptParam1"
ex...
Joe H.
Votes: 0
Answers: 2
Terminate a python script using an exit code, but does not exit and gives an error code instead
Here is my code for the exit statement👇
if "shutdown" in query:
speak("Ok, See you")
sys.exit(0)
These are the modules I have:
from google...
Adithya Srivathsa
Votes: 0
Answers: 1
Docker exec command is failing with EXIT CODE 137
I am running a CICD pipeline that runs a test script inside a docker container with docker exec and its failing with a return code of 137 every 3rd or 4th time. Here is the code that's running:
docker...
user3571643
Votes: 0
Answers: 2