2007-07-05, 12:16 PM
(This post was last modified: 2007-07-05, 12:18 PM by jerzykiller.)
1. I would like to say hello to everyone, because it is my first post :)
2. Some people are watching a lot of movies with subtitles. On example me :P Sometimes downloaded from some sites .txt file doesn't have the same name like ours .avi file. It's tiring to change these names in any gui application or even in console(usually there is a lot of other files like .rar, .r01...etc with similiar names). So I wrote this very little bash script which does that.
Code:
#!/bin/bash
mv *.txt $(basename *.avi .avi).txt
It will work only if in present dir is only one .txt and .avi file, and if these files names doesn't insist any spaces. I didn't know how to make it working with spaces. If anyone know, please let me know.
I hope it may be usefull for someone :]