BENGALURU, Aug 11 (Reuters) - Indian shares closed at four-month highs on Thursday, led by gains in technology and bank stocks, after a softer-than-expected U.S. inflation data eased fears of aggressive rate hikes by the Federal Reserve.

For domestic cues, investors are awaiting the consumer price index (CPI) data due on Friday. India's retail inflation likely eased in July due to a fall in food and fuel prices, but stayed well above the central bank's upper tolerance limit of 6% for a seventh consecutive month, a Reuters poll showed.

The NSE Nifty 50 index, posting gains for four straight sessions, closed 0.71% higher at 17,659, and the S&P BSE Sensex was up 0.88% at 59,332.60.

"The optimism came on the back of a U.S. consumer inflation rate that eased in July after hitting the peak a month before, raising hopes that the Fed will slow down the pace of interest rate hike," said Prashanth Tapse, research analyst at Mehta Equities, adding that bullish sentiment is likely to prevail as overseas investors remain net buyers.

Foreign investors have bought a net $2.24 billion worth of Indian equities so far this month, compared with $518 million worth of net selling in the same period last month, according to Refinitiv data.

Nifty's IT index was settled 1.8% higher, with Infosys, Tata Consultancy Services and Wipro adding between 1% and 2%.

Nifty's public sector bank index climbed 2.4% to snap a five-day losing run and was the best performer among other sub-indexes. Top lender State Bank of India's, up nearly 2%, was among the gainers of Nifty 50 index.

Globally, shares edged higher on optimism of a slower pace of interest rate hikes after U.S. data pointed to inflation peaking. The U.S. CPI, in the 12 months through July, increased by a weaker-than-expected 8.5% after a 9.1% rise in June. (Reporting by Rama Venkat in Bengaluru and additional reporting by Gaurav Dogra; Editing by Dhanya Ann Thoppil and Shailesh Kuber)