BENGALURU, July 14 (Reuters) - Indian shares edged higher on Thursday, helped by pharmaceutical stocks, but gains were capped by fears of aggressive interest rate hikes after hot U.S. inflation data.

The Indian rupee hit a record low against the dollar for a fourth straight session.

The NSE Nifty 50 index was up 0.4% at 116,026, as of 0523 GMT, and the S&P BSE Sensex gained 0.34% at 53,710.50.

U.S. consumer prices accelerated in June, resulting in the largest annual increase in inflation in 40-1/2 years and cementing the case for the Fed to hike interest rates by 75 basis points later this month.

Indian markets closed nearly 1% lower in the previous session.

"Wednesday's selling may have been overdone on the backdrop of positioning ahead of the CPI data... most of the rate hike expectations are largely priced in, leading to some relief buying," said Anand James, chief market strategist at Geojit Financial Services.

Strong domestic inflation data earlier this week also raised the prospect of more rate hikes by the Reserve Bank of India.

"With Indian and U.S. CPI out of the way, markets will now increasingly take a stock specific action rather than a broad based directional moves since we are in the middle of the earnings season," James said.

Pig iron maker Tata Metaliks fell as much as 8.7% after a slump in its June-quarter profit. On the other hand, shares of Hindustan Zinc jumped 6% after the company approved its biggest dividend since October 2020. The Nifty pharma index rose 1.3%, while the fast- moving consumer goods index gained 0.5%. (Reporting by Nallur Sethuraman in Bengaluru; Editing by Rashmi Aich and Amy Caren Daniel)