add remote candidate's exits validation
change [ to [[
add shell code style