Wall Street stocks chugged through a week light on US economic data and heavy on anticipation of news on Greece and the US Federal Reserve.
The Dow Jones Industrial Average finished up 49.38 points (0.28 percent) at 17,898.84, while the broad-based S&P 500 edged up 1.28 (0.06 percent) to 2,094.11.
The tech-rich Nasdaq Composite Index shed 17.36 (0.34 percent) to 5,051.10.
"Investors are still very uncertain as to which way the market will break," said Sam Stovall, chief investment strategist at S&P Capital IQ.
"Investors are still concerned about the very high valuations, worried about when the Fed will be raising rates... and they are concerned about what will transpire regarding Greece."
The week's major economic report, May retail sales, jumped a surprisingly robust 1.2 percent in a sign US consumers are beginning to regain confidence after a sluggish first quarter.
That came on the heels of an upbeat May jobs report released last week.
However, analysts said investors are cautious over lofty US equity valuations.
"When the S&P 500 gets over 2,100, it reaches a very stubborn wall. Institutional investors dig in their heels," said Hugh Johnson of Hugh Johnson Advisors.
"It's very hard to make the case for higher stock prices when you're staring down the gun barrel of a hike in interest rates by the Fed."
Besides the Fed, the endless Greek debt saga dragged on sentiment, with stocks veering up and down depending on whether a deal seemed more or less likely.
The week ended on a sour note as eurozone officials confirmed conducting "worst-case" scenarios based on a Greek default, while the IMF walked away from talks, saying the Greeks were being unreasonable.
Greece faces a 1.6-billion-euro ($1.8 billion) payment to the IMF at the end of the month and must persuade creditors to unlock 7.2 billion euros in international bailout funds.
- Shakeups at Fox, Twitter -
The week's most dramatic corporate headlines involved major executive changes at Rupert Murdoch's 21st Century Fox and Twitter.
At 21st Century Fox, the elder Murdoch, 84, is to pass on the chief executive role and leadership of his far-flung media empire to his son James and install his other son, Lachlan, as executive chairman.
The plan is to be presented next week to the board of directors, a source familiar with the company told AFP.
At Twitter, chief executive Dick Costolo announced he would step down July 1 following a turbulent tenure that has aroused criticism over sluggish growth.
Costolo will hand the reins over to Twitter co-founder Jack Dorsey, who will lead the company on an interim basis while the board finds someone to replace Costolo long term.
Other major corporate stories included a deal for General Electric to divest a pair of finance assets to the Canada Pension Plan Investment Board for $12 billion and a move by Apple to launch "Apple Music," a new subscription service allowing users to stream songs, listen to playlists and connect with performers.
Nike announced an eight-year deal with the NBA to become the exclusive on-court apparel provider for the US basketball league.
Both the Fed and Greece will stay at the forefront of investors' minds next week. The calendar includes a meeting of the Fed's monetary policy committee on Wednesday, followed on Thursday by a meeting of eurozone finance ministers in Luxembourg to discuss Greece.