enforce C or POSIX locale in all shell scripts and turn of enforced global grep options
(cherry picked from commit c570bf26e0d8ba638b322b41709d873bf871ef5d)