Egypt beat Australia on penalties on Friday to advance to the last 16 at the World Cup for the first time.