Get error text during run command or script on Redhat EL 6 (64bit)
sh: module: line 1: syntax error: unexpected end of file
sh: error importing function definition for `BASH_FUNC_module'
Solution
1. mv /etc/profile.d/modules.sh /etc/profile.d/modules.sh_old
2. User OS log out and log in again (refresh environment).