[EMAIL PROTECTED] writes:

>       perl -e 'opendir DIR,".";@f = grep { ! /^\./ && -f $_ } readdir(DIR);\
>         map {($n = $_)=~ s/\s+/_/g; rename ($_, $n) } @f;'

Things that come to mind when I see this:

1:  this code doesn't recurse.

2:  this code skips over files with a name that begins with ".".
    (". foo" doesn't get touched)

3:  this code doesn't rename directory names with spaces (I have quite
    a few MP3 directories like this -- I don't know if this is
    important to the original poster or not).


Regarding the various comments that this is unreadable:  I disagree,
but everybody is entitled to their opinion.

Regards,

--kevin
-- 
Kevin D. Clark / Cetacean Networks / Portsmouth, N.H. (USA)
cetaceannetworks.com!kclark (GnuPG ID: B280F24E)
alumni.unh.edu!kdc

_______________________________________________
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss

Reply via email to