Re: Relabeling all audio files on a server

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

 



Phil Meyer wrote:
> On 05/30/2010 04:21 PM, Leonard Adjei wrote:
>> I have a server which houses thousands of audio tracks and materials.
>> Recently I started using a web application which seems to have a ew
>> problems with the naming convention used by default.
>> For example it has a problem with apostrophe signs ('), I want to be
>> able to create a script which goes to through the folder and all
>> files and folders under it and renames all the tracks by deleting
>> every entry of the apostrophe where it encounters them.
>> E.g. This ain't no game =>  This aint no game
>>         Mr Brown's Last supper =>  Mr Browns Last supper
>> and like that. I want the apostrophe sign to be deleted but everything
>> else stays the same.
>> Any suggestions on doing this would really be appreciated. Thanks.
>>    
> 
> 
> Other suggestions are good, but ...
> 
> When using find on files and directories where unknown characters may 
> be, learn to use -print0
> 
> This uses a NULL terminated string, as apposed to a white-space 
> terminated string, which is the default.
> 
> For instance:
> 
> $ find /my_dir -type f \( -name \*wav -o -name \*WAV \) -print0 | xargs 
> --null command
> 
> That way you can be sure that 'command' will work upon those file names 
> regardless of character composition.
> 
Exactly why I didn't use xargs in the script I offered earlier. But since I 
wanted to avoid doing the requested name changes to the directory names, I read 
it and used bash editing capabilities.

-- 
Bill Davidsen <davidsen@xxxxxxx>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux