I have hundreds of jpg files in different folders like this:
Basically, I need to remove the SPACES. I already know the command to change the spaces into underscores:
$ rename "s/ /_/g" *
But I do not need the underscores in this case. I just need to remove the space. I tried the following, but it didn't work:
$ rename "s/ //g" *
Any help would be appreciated.
The following would work in case it was really a space.
$ rename "s/ //g" *
Try
$ rename "s/\s+//g" *
\s
is a whitespace character, belonging to the set of [ \t\r\n]
.