This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This is a fork of dylan-k code. Only the actual short line to rename inside a loop is changed to a long line. | |
#Original code gave errors on some special characters. For example if a back slash \ was in the first line to be used as new name. | |
#Those files were not renamed. This new line ignores those problematic characters and even more, using alphanumeric naming. | |
#Many ways to do alpnum renaming are suggested but most actually fail in many cases and bashes and distros. | |
#This new forked way, alpnum renaming will not fail. | |
#dylan-k: A shell script that will rename all the text files in a directory | |
#each file will be named with the first line of text from that file | |
for file in * | |
do |