5 added 71 characters in body
source | link

You can install the Perl script rename. Then try doing this :

$ rename -n 's/[A-Z]/lc($&)/ge; s/\s/_/g' files*

(remove the -n switch when your tests are OK)


There are two utilities called rename. The one in Fedora can't do this. Some other distributions come with the Perl one by default. If you run the following command (GNU)

$ file "$(readlink -f "$(type -p rename)")"

and you have a result like

.../rename: Perl script, ASCII text executable

and not containing:

ELF

then this seems to be the right tool =)

If not, such as on Fedora, install it manuallyinstall it manually.

Last but not least, this tool was originally written by Larry Wall, Perl's dad.

You can install the Perl script rename. Then try doing this :

$ rename -n 's/[A-Z]/lc($&)/ge; s/\s/_/g' files*

(remove the -n switch when your tests are OK)


There are two utilities called rename. The one in Fedora can't do this. Some other distributions come with the Perl one by default. If you run the following command (GNU)

$ file "$(readlink -f "$(type -p rename)")"

and you have a result like

.../rename: Perl script, ASCII text executable

and not containing:

ELF

then this seems to be the right tool =)

If not, such as on Fedora, install it manually.

Last but not least, this tool was originally written by Larry Wall, Perl's dad.

You can install the Perl script rename. Then try doing this :

$ rename -n 's/[A-Z]/lc($&)/ge; s/\s/_/g' files*

(remove the -n switch when your tests are OK)


There are two utilities called rename. The one in Fedora can't do this. Some other distributions come with the Perl one by default. If you run the following command (GNU)

$ file "$(readlink -f "$(type -p rename)")"

and you have a result like

.../rename: Perl script, ASCII text executable

and not containing:

ELF

then this seems to be the right tool =)

If not, such as on Fedora, install it manually.

Last but not least, this tool was originally written by Larry Wall, Perl's dad.

4 make the answer less confusing by not leading with something that won't work for the asker
source | link

TryYou can install the Perl script rename. Then try doing this :

$ rename -n 's/[A-Z]/lc($&)/ge; s/\s/_/g' files*

(remove the -n switch when your tests are OK)

warning http://pix.toile-libre.org/upload/original/1377510865.png There are other tools with the same name which may or may not be able to do this, so be careful.

 

There are two utilities called rename. The one in Fedora can't do this. Some other distributions come with the Perl one by default. If you run the following command (GNU)

$ file "$(readlink -f "$(type -p rename)")"

and you have a result like

.../rename: Perl script, ASCII text executable

and not containing:

ELF

then this seems to be the right tool =)

If not, to make it the default (usually already the case)such as on Debian and derivative like Ubuntu :

$ sudo update-alternatives --set rename /path/to/rename

(replace /path/to/rename to the path of your perl's rename command.


If you don't have this commandFedora, search your package manager to install it or do it manuallymanually.


 

Last but not least, this tool was originally written by Larry Wall, the Perl's dad.

Try doing this :

$ rename -n 's/[A-Z]/lc($&)/ge; s/\s/_/g' files*

(remove -n switch when your tests are OK)

warning http://pix.toile-libre.org/upload/original/1377510865.png There are other tools with the same name which may or may not be able to do this, so be careful.

If you run the following command (GNU)

$ file "$(readlink -f "$(type -p rename)")"

and you have a result like

.../rename: Perl script, ASCII text executable

and not containing:

ELF

then this seems to be the right tool =)

If not, to make it the default (usually already the case) on Debian and derivative like Ubuntu :

$ sudo update-alternatives --set rename /path/to/rename

(replace /path/to/rename to the path of your perl's rename command.


If you don't have this command, search your package manager to install it or do it manually


 

Last but not least, this tool was originally written by Larry Wall, the Perl's dad.

You can install the Perl script rename. Then try doing this :

$ rename -n 's/[A-Z]/lc($&)/ge; s/\s/_/g' files*

(remove the -n switch when your tests are OK)

 

There are two utilities called rename. The one in Fedora can't do this. Some other distributions come with the Perl one by default. If you run the following command (GNU)

$ file "$(readlink -f "$(type -p rename)")"

and you have a result like

.../rename: Perl script, ASCII text executable

and not containing:

ELF

then this seems to be the right tool =)

If not, such as on Fedora, install it manually.

Last but not least, this tool was originally written by Larry Wall, Perl's dad.

3 deleted 1 character in body
source | link

Try doing this ;:

$ rename -n 's/[A-Z]/lc($&)/ge; s/\s/_/g' files*

(remove -n switch when your tests are OK)

warning http://pix.toile-libre.org/upload/original/1377510865.png There are other tools with the same name which may or may not be able to do this, so be careful.

If you run the following command (GNU)

$ file "$(readlink -f "$(type -p rename)")"

and you have a result like

.../rename: Perl script, ASCII text executable

and not containing:

ELF

then this seems to be the right tool =)

If not, to make it the default (usually already the case) on Debian and derivative like Ubuntu :

$ sudo update-alternatives --set rename /path/to/rename

(replace /path/to/rename to the path of your perl's rename command.


If you don't have this command, search your package manager to install it or do it manually


Last but not least, this tool was originally written by Larry Wall, the Perl's dad.

Try doing this ;:

$ rename -n 's/[A-Z]/lc($&)/ge; s/\s/_/g' files*

(remove -n switch when your tests are OK)

warning http://pix.toile-libre.org/upload/original/1377510865.png There are other tools with the same name which may or may not be able to do this, so be careful.

If you run the following command (GNU)

$ file "$(readlink -f "$(type -p rename)")"

and you have a result like

.../rename: Perl script, ASCII text executable

and not containing:

ELF

then this seems to be the right tool =)

If not, to make it the default (usually already the case) on Debian and derivative like Ubuntu :

$ sudo update-alternatives --set rename /path/to/rename

(replace /path/to/rename to the path of your perl's rename command.


If you don't have this command, search your package manager to install it or do it manually


Last but not least, this tool was originally written by Larry Wall, the Perl's dad.

Try doing this :

$ rename -n 's/[A-Z]/lc($&)/ge; s/\s/_/g' files*

(remove -n switch when your tests are OK)

warning http://pix.toile-libre.org/upload/original/1377510865.png There are other tools with the same name which may or may not be able to do this, so be careful.

If you run the following command (GNU)

$ file "$(readlink -f "$(type -p rename)")"

and you have a result like

.../rename: Perl script, ASCII text executable

and not containing:

ELF

then this seems to be the right tool =)

If not, to make it the default (usually already the case) on Debian and derivative like Ubuntu :

$ sudo update-alternatives --set rename /path/to/rename

(replace /path/to/rename to the path of your perl's rename command.


If you don't have this command, search your package manager to install it or do it manually


Last but not least, this tool was originally written by Larry Wall, the Perl's dad.

2 added 1 character in body
source | link
1
source | link