otey
November 18th, 2005, 05:09 PM
Hi..
Im no skilled programmer.. only do PHP and a tiny bit of java-script, so i was wondering if anybody would help me out at this
This code is from my .abcde.conf file, and it is surpose to do something like transformig spaces and / to underscores and some other stuff..
The conf-files description is this:
# Custom filename munging:
# By default, abcde will do the following to CDDB data to get a useful
# filename:
# * Translate colons to a space and a dash for Windows compatibility
# * Eat control characters, single quotes, and question marks
# * Translate spaces and forward slashes to underscores
# * Translate stars into pluses.
# To change that, redefine the mungefilename function.
# mungefilename recieves the CDDB data (artist, track, title, whatever)
# as $1 and outputs it on stdout.
#mungefilename ()
#{
#echo "$@" | sed s,:,\ -,g | tr \ /\* __+ | tr -d \'\"\?\[:cntrl:\]
#}
What language is this?
Were can i learn to understand this function?
I would be very happy if someone could explane this to me, and maybe give me an example where the spaces are not converted to underscores, and the slashes are converted to "-" instead of underscores.
Im no skilled programmer.. only do PHP and a tiny bit of java-script, so i was wondering if anybody would help me out at this
This code is from my .abcde.conf file, and it is surpose to do something like transformig spaces and / to underscores and some other stuff..
The conf-files description is this:
# Custom filename munging:
# By default, abcde will do the following to CDDB data to get a useful
# filename:
# * Translate colons to a space and a dash for Windows compatibility
# * Eat control characters, single quotes, and question marks
# * Translate spaces and forward slashes to underscores
# * Translate stars into pluses.
# To change that, redefine the mungefilename function.
# mungefilename recieves the CDDB data (artist, track, title, whatever)
# as $1 and outputs it on stdout.
#mungefilename ()
#{
#echo "$@" | sed s,:,\ -,g | tr \ /\* __+ | tr -d \'\"\?\[:cntrl:\]
#}
What language is this?
Were can i learn to understand this function?
I would be very happy if someone could explane this to me, and maybe give me an example where the spaces are not converted to underscores, and the slashes are converted to "-" instead of underscores.