DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Bash - Rinomina.sh

02.23.2006
| 836 views |
  • submit to reddit
        // rinomina i file .wmv in file .asf in una cartella...

#!/bin/sh

#
# rinomina i file di una cartella
#

for I in `ls *.wmv|tr " " "_"`
do
	mv "$(echo $I|tr "_" " ")" "$(echo $(basename $I .wmv) | tr "_" " ").asf"
done