cygwin has bash version 4.1.10.
Is there a bash version 3.2+ for windows - or how to do regex in 3.1?
Question
I'm using MINGW32 on Windows 7. Unfortunately, it comes with bash version 3.1, so when I try to do something in a shell script like
if [ $x =~ $y ]
where $y is a regex, I get the message "conditional binary operator expected" near `=~'
Is there a version of bash.exe available that is bash 3.2 or better? And if not, how can I test a string against a pattern in 3.1?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow