Hi I have a shell script which should run based on the return of php code:
x=1
while [[ "$x" != 5 ]]
do
echo "Welcome $x"
php test.php
x=$?
done
And the php code
echo "Testdfdf test".PHP_EOL;
exit(4);
So I want whenever I get 5 from php to quit the loop.
But I get sometimes:
./myshell: line 7: 20529 Segmentation fault php test.php
Should it loop without problem?