let say you have many files in a directory, and you need to rename them all at once. you can go the route and do each one by one. but man that takes way too long. why not a bash script? with bash you can easily rename all your files quickly at once.
first off go into the directory you want to do this in and choose the file extensions, let say we are doing this with images this will list all the *.jpg images in your directory
you can also list this way it does the exact same thing.
let say you want to rename a particular portion w/in the jpg image.
the wild cards can be places strategically.
now that you have this, and you want to remove the “_blah”, test the waters with the “echo” command before the “mv” command
the command below is the how you do a simple string replace
you are basically saying w/in $i, look for _blah and remove. if you put another slash afterwards it means replace with _meh
thats all! have fun replacing files, oh yeah remove the echo when you want to execute it completely.