The dollar held gains after rebounding following its worst July in a decade.