test cmd if exists through hash.