Pakistan and Bangladesh have edged closer as politics in both countries ride on a general anti-India sentiment.