handle mksh in scripts/initialize extglob if, update #3142
replace all file descriptors redirections with here docs with evaluation, update #3142