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?

Was it helpful?

Solution

cygwin has bash version 4.1.10.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top