All below are all great advice, but didn't actually answer your question did it? Just pointed you at ways to get at the answer. That is because the exact answer can vary depending on a number of situations.
That said ... a general ballpark would be:
You'd need to put earnest money down at the time of offer ... that could range from $500-$5000 depending on your negotiation strategy. ( Legally, it can be as little as $1 but that isn't commonly accepted in our market.)
In Massachusetts, we have a 2 phase offer process. After the initial offer is negotiated and accepted, there is a Purchase & Sale process. That could be as simple or complicated as you want to make it and would take anywhere from a day to 10 days to get through. Upon signing the Purchase and Sale Agreement (P&S) then the expectation is that you will have put around 5-6% deposit into Escrow counting the money you already put as earnest money. (This amount can also vary).
Depending who you use as your buyer/closing attorney ... you'd probably be out another $2000 or so on closing fees (title search, processing paperwork, insurance binder) Depending on the complexity of the deal and the title issues ... you could close as quickly as 2-3 weeks upon an agreed upon deal at which point you'd need to pay the balance of the purchase price as well as any additional closing costs.
As a cash buyer, accredited proof of funds would be expected at the time of offer.
I hope that gives you a better idea of what you'd be up against. Of course, working with an experienced relocation agent, like myself and the other agents here who have responded to your question, could only expedite and facilitate a smooth tranaction(s) for you. I also know resources for property management, repairs, insurance ... etc that may be helpful to you if you do not plan to remain local after your purchase.