I know how to check the status of the previously executed command using $?, and we can make that status using exit command. But for the loops in bash are always returning a
Use artificial exit code