They were confounded, i.e. the troops and companies. Because they had hoped; they comforted themselves with the expectation of water there to quench their thirst. Were ashamed; as having deceived themselves and others with vain and false hopes.
Related Commentaries of Job 6:20
Job 6:20
20 They were confounded because they had hoped; they came thither, and were ashamed.