[Nepal] question about mass file renaming w/ bash script

Bernie Innocenti bernie at codewiz.org
Wed Sep 3 01:35:09 EDT 2008


Bryan Berry wrote:
> Figured it out, need to match that damn leading period!

It's not a leading period!  In the regex syntax, "." means
"match any character", and "*" means "match previous thing
any number of times".

So, ".*" means "match anything".

And if you want to specify a real dot, you have to escape
it as such: "\."

Why is the regex syntax different from shell globs?  They say for
historical reasons, but I guess it's just an evil trick to confuse
users.

-- 
   \___/  Bernie Innocenti - http://www.codewiz.org/
  _| X |  Sugar Labs Team  - http://www.sugarlabs.org/
  \|_O_|  "It's an education project, not a laptop project!"


More information about the Nepal mailing list