DEV Community

Discussion on: Bash: Rename specific files in a folder

Collapse
 
vlasales profile image
Vlastimil Pospichal

Use command rename.

Collapse
 
miku86 profile image
miku86

Hey Vlastimil,

thanks for showing an alternative.

While solving my challenge,
I found out, that there are 2 packages called rename.

One that is working with perl and uses regex,
one that comes from util-linux, that doesn't use regex.

The user would have to install the perl one, depending on the distro (s)he's using.

Therefore I use the solution with the lowest complexity, e.g. installing additional packages after checking which rename its distro is using.