On 05/30/2010 05: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.You may find the tr command handy in building the script. For a single directory, you could start with something like this (not tested): for i in * ; do j=$(echo $i | tr -d \' ) mv "$i" "$b" done You need the quotes around $i and $j because of spaces in the name. This script will also remove the 's from directory names. Mikkel -- Do not meddle in the affairs of dragons, for thou art crunchy and taste good with Ketchup!
signature.asc
Description: OpenPGP digital signature
-- users mailing list [email protected] To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
