Retail sales rose in August from July because consumers paid higher gas prices and bought more cars and trucks. They were more cautious elsewhere, suggesting the weak economy has made many selective about spending.

The Commerce Department said Friday that retail sales increased a seasonally adjusted 0.9 of a percent. Gas station sales jumped 5.5 percent, the most in nearly three years and a reflection of sharp price increases. Demand for autos increased 1.7 percent.