mercredi 3 septembre 2014

Regex doesnt match the file path in bash


Vote count:

0




I've spent quite some time trying to figure out why this regex doesn't match files with names like: /var/tmp/app.0.attachments .... /var/tmp/app.11.attachments



sudo rm -rf /var/tmp/app/\.([0-9]{1}|1[0-1]{1})/\.attachments

$: -bash: syntax error near unexpected token `('


I've tried escaping '[', ']', | and {}


Please help.



asked 45 secs ago







Regex doesnt match the file path in bash

Aucun commentaire:

Enregistrer un commentaire