Use foreach  rather than /etc/profile.d/*.sh