South Africa, who had a disappointing ICC Cricket World Cup 2019, ended their campaign with a ten-run win over Australia.