Re: lowercase to uppercase

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Justin Banks wrote:
RedHat wrote
  
This worked for me.
    

<snip>

That's a little heavy ;)

You're spawning 4 subshells for every rename. You don't need any, if you don't
use /bin/sh. /bin/sh is a good tool, but it's not the only one, and in this
case (IMO), it's not the best one.

Timings for 5000 files created as all uppercase names from dict/words :

men<justinb>1718% time sh ../yours 
16.790u 34.830s 0:56.52 91.3%	0+0k 0+0io 1335239pf+0w

versus

amen<justinb>1724% time perl ../mine 'tr/A-Z/a-z/' *
0.490u 3.510s 0:04.44 90.0%	0+0k 0+0io 298pf+0w

-justinb

  
Maybe I'll look into this Perl craft. =-O
Thanks.

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux