Regex is triggering an 'Unextpected token' in my bash script , but it looks good as best I can tell. What am I doing wrong?

后端 未结 0 361
生来不讨喜
生来不讨喜 2020-12-18 16:13

I have the following in my bash script:

if [ $YEAR_MONTH =~ ^[0-9]{4}-(0[1-9]|1[0-2])$]
        then
                        echo "ERROR: Incorrct folder         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题