Fix "bash: [: -eq: unary operator expected" errors when "stat" command has errors