문제

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?

도움이 되었습니까?

해결책

cygwin has bash version 4.1.10.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top