act as a substitute for vs do duty as

act as a substitute for

do duty as

How often have the words act as a substitute for and do duty as occurred in a corpus of books? (source: Google Ngram Viewer )