troubleshooting Question

Rename Multiple files in linux Using a WILDCARD

Avatar of jags2ooo
jags2ooo asked on
Linux
3 Comments1 Solution844 ViewsLast Modified:
HI!!!!!!   I have files named
-Abc-Galaxy Angel-[LIME]_Galaxy_Angel_1.mkv

through

-Abc-Galaxy Angel-[LIME]_Galaxy_Angel_26.mkv

would like to rename them to
[LIME]_Galaxy_Angel_1.mkv
[LIME]_Galaxy_Angel_26.mkv


How would i do this  in linux? I tried using a perl command that i usual use but it keeps prompting me with a error i think its cause of the -A infront of the file name.

The command i tried was

perl -e '($r=$_)=~s/\-Abc-Galaxy Angel-[LIME]/[LIME]/ && rename $_,$r for @ARGV' *.mkv

THE ERROR:
Unrecognized switch: -Abc-Galaxy Angel-[LIME]_Galaxy_Angel_07.mkv
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros