You have to talk to the man and see what he says.
Same species with different ID numbers:
Chance of getting an egg; 70% | Statement; "The two seem to get along very well!"
Same species with same ID numbers:
Chance of getting an egg; 50% | Statement; "The two seem to get along"
Different species with different ID numbers:
Chance of getting an egg; 50% | Statement; "The two seem to get along"
Different species with same ID numbers:
Chance of getting an egg; 20% | Statement; "The two don't seem to like each other"
Different Egg Groups:
Chance of getting an egg; 0% | Statement; "The two prefer to play with other Pokémon more than with each other."
Basically, every 256 steps, that chance is taken. If you make it, then you get an egg. If you don't, then no egg.
http://Pokemondb.net/pokedex/sandshrew
It would hatch as a sandshrew.
And it would take minimum 5355 steps to hatch.
Eggs utilize the same memory allocation as Pokémon, so the coding structure is very similar. What would be the friendship value in a Pokémon is the Egg cycle count for an Egg. Unlike friendship, this value counts down after every 256 steps (255 from Generation IV on), rather than increasing. When the count reaches zero, the Egg will hatch. The number of Egg cycles required for an Egg to hatch is determined by its species and is determined at creation.
From Bulbapedia
Sorry for the complicatedness but basically, as you can see on Sandshrew's Pokedex page there are 21 egg cycles; 21 * 255 = 5355.
And if you have a Pokmeon with Magma Armor or Flame Body ability at the front of your party, the steps needed are halved.
http://www.serebii.net/games/breed.shtml
Hope I helped! :D