Shah made up for the absence of injured pace spearhead Wahab Riaz to keep Sri Lanka down to 304-9 by stumps on the second day in reply to the tourists' modest 138.
Opener Kaushal Silva top-scored with 80 and skipper Angelo Mathews made 77, but Sri Lanka lost six wickets for 112 runs after at one stage being 191-3.
Rangana Herath (10) and last man Dushmantha Chameera (0) will resume on the third day with their team leading by 166 runs on a pitch that is giving spinners plenty of bounce and turn.
Pakistan missed Wahab, who has been ruled out for the rest of the series with a hairline fracture in his left hand that he received while batting on Thursday.
Wahab bowled nine overs on the first day but did not take the field on Friday, leaving Pakistan one strike bowler short.
Yasir, whose seven-wicket haul in Sri Lanka's second innings fashioned Pakistan's 10-wicket victory in the first Test in Galle, once again tormented the rival batsmen.
He had Lahiru Thirimanne caught at short-leg by Azhar Ali for seven before lunch, and then bowled both Dinesh Chandimal (one) and Kithuruwan Vithanage (three) in the afternoon session.
Yasir's dismissal of Mathews gave the leg-spinner his 50th wicket in only nine Tests, making him the fastest among Pakistani bowlers to reach the mark.
- Idol Warne boosted Yasir -
============================
Yasir said he derived his confidence from an encouraging tweet by Australian leg-spin legend Shane Warne, whom he regards as his idol.
Warne had tweeted last year after watching Shah bowl on television: "I like the look of this leggie Yasir Shah, plenty of energy and nice variations of pace."
"His words actually put me under pressure to live up to his appreciation and it has been good so far," the 29-year-old Yasir said.
"The focus remains on bowling a good line and length and control my variations. One needs to be patient in Test cricket and that is what I am trying to do.
You’ve reached your limit of {{free_limit}} free articles this month.
Subscribe now for unlimited access.
Already subscribed? Log in
Subscribe to read the full story →
Smart Quarterly
₹900
3 Months
₹300/Month
Smart Essential
₹2,700
1 Year
₹225/Month
Super Saver
₹3,900
2 Years
₹162/Month
Renews automatically, cancel anytime
Here’s what’s included in our digital subscription plans
Exclusive premium stories online
Over 30 premium stories daily, handpicked by our editors


Complimentary Access to The New York Times
News, Games, Cooking, Audio, Wirecutter & The Athletic
Business Standard Epaper
Digital replica of our daily newspaper — with options to read, save, and share


Curated Newsletters
Insights on markets, finance, politics, tech, and more delivered to your inbox
Market Analysis & Investment Insights
In-depth market analysis & insights with access to The Smart Investor


Archives
Repository of articles and publications dating back to 1997
Ad-free Reading
Uninterrupted reading experience with no advertisements


Seamless Access Across All Devices
Access Business Standard across devices — mobile, tablet, or PC, via web or app
