History Command Inside Shell Script Issue Resolved

Here is an Scenario that i would like to get one email from each and...