The Tigers, who have never beaten the Aussies in a Test match, were 45/1 at the close, an overall lead of 88 after the visitors were bowled out for 217 in their first innings in reply to 260.
The home team would have been in an even stronger position but opener Soumya Sarkar (15) gave his wicket away close to the end of play when he skied a catch off the bowling of Ashton Agar to Usman Khawaja, who needed four attempts to complete the catch.
Tamim Iqbal (30) and nightwatchman Taijul Islam, who is yet to get off the mark, will resume on the third day trying to build the home team’s lead.
Australia resumed the morning on 18/3 and quickly got exposed on a turning pitch, with left-arm spinner Shakib finishing with figures of 5/68 from 25.5 overs.
Right-arm off-spinner Mehidy Hasan bowled 26 overs and took three for 62 while the other wicket was taken by another slow-bowler, Taijul.
Opener Matt Renshaw top-scored for the Aussies with 45 while Agar tried valiantly to keep the innings together at the end with 41 not out. There was also useful contributions from Peter Handscomb (33) and Pat Cummins (25).
Australia’s batsmen will need to find a way of coping with the turning pitch quickly if they don’t want to avoid going one-nil down in the two-match series.