rename using regexpr - is it possible?

Fergus Daly fergusd84@outlook.com
Sun Oct 24 09:29:05 GMT 2021


I might be wrong but:
The Cygwin implementation of rename seems completely different from "the" (my) Linux version.
(Almost unique? Otherwise the matching in Cygwin of all syntax - vocab, switches, outcomes - to Linux, seems almost perfect.)
Can I rename a set of files *.d (say) as filename.d -> XXfilename.d?
In Linux this would be achieved by
$ rename 's/^/XX/g' ./*.d
whereas in Cygwin
$ rename ^ XX *.d
(and all similar attempts) fails.
Thank you.



More information about the Cygwin mailing list