I have a command to ssh on to another machine and remove some files. I want the program to wait for this command to finish before proceeding. What is the simplest way to do this?

Thanks!

Example:

`ssh user_name\@machine \"rm -rf delete_file\"
****Here is where I would like to wait for the ssh command to finish.***