I have a BASH script I wrote that removes META data off mp3 (etc) then I chop them up to reform them if needed resample the mp3 and reasign the data to make a directory to corraspond to artist / album ... I got a hold of some mp3's that have non english chars in the middle of the song title. I need to know the best way to remove that middle part leaving both ends of the sting put back together to the title of the song. using exiftool I strip the META data off giving me this output placed into the var-name ARTIST1=`exiftool -Artist $FILENAME -p '$Artist'` TITLE1=`exiftool -Title  $FILENAME -p '$Title'` ALBUM1=`exiftool -Album  $FILENAME -p '$Album'`first strip... Artist is -> The Stranglers and Friendsfirst strip... Album is -> Live infirst strip... Title is -> The Raven  With Basil Gabbisong title in META DataThe Raven   With Basil Gabbihow would I strip what is between the META data song name to get this instead?The Raven With Basil Gabbiwhere the syntext would look something like this newSongName=$( what ever code goes here to strip out that non english sting part )so I can write the new string back into the file replacing the old META data with the new string. Thanks
How to remove non english chars from a string
shell script;string
the string with garbble in it -> $ x=The Raven  With Basil Gabbithis keeps hold of all caps and lower case a-z removes everything else$ echo ${x//[^A-Za-z ]/}leaving the string like thisThe Raven With Basil Gabbiwould look like this is scripttitle=${TITLE1}## holds on to normal chars rid the resttitle=${title//[^A-Za-z ]/}