> - if [[ $port =~ ^(eth|bond|wlan)[0-9]{1,2}$ ]] > + if [[ $port =~ "^(eth|bond|wlan)[0-9]{1,2}$" ]] OK, this does not work because dash does not have [[ ]] syntax, and 'test' have no regex support.