Exit script with error code based on loop operations in bash