History Command Inside Shell Script Issue Resolved