Environment script generation: use awk to split records by semi-colons

- No need to use sed, and using '\n' in sed replacement is not portable