How can I rename all files within a folder with the first word of their content? For example if a.txt contains Unix is an OS in its first line then a.txt should be renamed to Unix.txt
Renaming multiple files based on their contents
rename