translated c++ to shell