Currently in Rhel6.5 bash-4.1.2-15 package is used and =~ operator is not supported in this version.
This problem is resolved by adding shopt -s compat31 in shell scripts but I don't want to take this commands into all shell scripts.
There are lot of shell scripts are used in my project.
Please provide a solution.