Search code examples
bashmingw32git-bash

Is there a bash version 3.2+ for windows - or how to do regex in 3.1?


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

  • cygwin has bash version 4.1.10.