system("$cmd $ip >$file") and warn "Can not execute $cmd: $!\n";