As always, the mighty Half Man Half Biscuit have a song about this very situation:
So I’m walking down the road
And heading towards me
Is somebody I know
But not like a brother
He’s seen me, and we both realise
That we’re going to have to put into operation
The tricky manoeuvre that is
Acknowledgement without breaking stride
So I keep my eyes fixed firmly on the ground
‘Til I get within ten or so feet away
With a nod of the head
And a timely hello
I can carry on walking
Don’t wanna get talking
Rule number one – carry on walking
And anyway I don’t know his name
And if I were to guess
I’d guess it all wrong
And I’d be there for a long time
How’s it going, where’re you living
Do you still see much of Steve?
Are you married, are you working
Do you still drink in The Swan?