-sh: !: event not found error
Posted: 23 Apr 2016, 00:24
Hi,
first of all well done for this brilliant tool! I am new to all this and in no way a coding guru so please be gentle...
I am trying to adapt the "DevXen's Enhanced MOVIE Perfection Naming Scheme" to my needs and after a very long time trying to understand and working it all I am getting the following error when running it:
my version of it is as follow:
I'll appreciate any given help and comments to help me step forward with this.
cheers
first of all well done for this brilliant tool! I am new to all this and in no way a coding guru so please be gentle...

I am trying to adapt the "DevXen's Enhanced MOVIE Perfection Naming Scheme" to my needs and after a very long time trying to understand and working it all I am getting the following error when running it:
Code: Select all
-sh: !: event not found
Code: Select all
filebot -script fn:amc /share/Fresh_Downloads --output /share/Download {any{if (file.path.lower().matchAll(/(3d|half|full|h?sbs|f?sbs|(?i)(?<=^|[^a-z])hou(?=$|[^a-z])|(?i)(?<=^|[^a-z])fou(?=$|[^a-z])|f.ou|anaglyth)(?:.sbs|(?i)(?<=^|[^a-z])cat(?=$|[^a-z]))?/)){'C:/[3D Movies]/'}}{'/share/Download/Movies/'}}{any{def map=['louisdefunes':'[Actors]/Louis_de_Funes','charleschaplin':'[Actors]/Charles Chaplin','jeanpaulbelmondo':'[Actors]/Jean-Paul Belmondo']; actors.join(', ').lower().replaceAll(/[\W]/, "").matchAll(/louisdefunes|charleschaplin|jeanpaulbelmondo/).findResults{ map[it] }.join(',')+'/'}{def map=[/rifftrax/:'RiffTrax','miniseries':'Mini-Series','monstervision':'MonsterVision','fanedit':'FanEdits','usaupallnight':'USA Up All Night',/elvirasmoviemacabre/:'Elvira\'s Movie Macabre']; '['+file.path.lower().replaceAll(/[\W]/, "").matchAll(/monstervision|rifftrax|fanedit|usaupallnight|elvirasmoviemacabre/).findResults{ map[it].replaceAll("\\[|\\]", "") }.sort{ map.values().indexOf(it)}.join(',')+']/'}{(info.SpokenLanguages.displayLanguage.contains(/English/)) ? '' : '[Foreign Films]/'}{(info.SpokenLanguages.displayLanguage.contains(/French/)) ? '' : '[Foreign Films]/'}{(info.SpokenLanguages.displayLanguage.contains(/Spanish/)) ? '' : '[Foreign Films]/'}}{any{if (genres.join(', ').matchAll(/animation/))('Animes/')}{genre}{'[No Genre]'}}/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th| nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{" (Part ${pi.pad(2)})"}{" ["+file.path.lower().replace(/dc/, 'director\'s cut').replaceAll('limited','limited release').replaceAll('directors','director\'s').replaceAll('-','').replaceAll(/director.s|theatrical/,'$0 Cut').matchAll(/(uncensored|uncut|unrated|remastered|ultimate|extended|director?s|theatrical|ultimate|final|bootleg|special|fan?edit?|limited|rifftrax|monstervision|youtube|hulu|netflix|vimeo|edited|edit|censored+)(?:.edition|.cut|.version|.edit|.release|.extended|.rip)?/)*.upperInitial()*.lowerTrail().sort().join('] [')+']'}{def map=['3d':'3D','hsbs':'Half-SBS','halfsbs':'Half-SBS','fsbs':'Full-SBS','fullsbs':'Full-SBS','sbs':'SBS','halfou':'Half-OU','fullou':'Full-OU','overunder':'OU','anaglyth':'Anaglyth']; " ("+ ((file.path.lower().contains(/3d/)) ? '' : '3D ')+ file.path.lower().replaceAll(/(?i)(?<=^|[^a-z])hou(?=$|[^a-z])/,'halfou').replaceAll(/(?i)(?<=^|[^a-z])fou(?=$|[^a-z])/,'fullou').replaceAll(/(?i)(?<=^|[^a-z])ou(?=$|[^a-z])/,'overunder').replaceAll(/[\W]/, "").matchAll(/3d(?!.*?3d)|hsbs(?!.*?hsbs)|halfsbs(?!.*?halfsbs)|fsbs(?!.*?fsbs)|fullsbs(?!.*?fullsbs)|sbs(?!.*?sbs)|halfou(?!.*?halfou)|fullou(?!.*?fullou)|overunder(?!.*?overunder)|anaglyth(?!.*?anaglyth)/).findResults{ map[it]}.sort().join(' ')+')'}{any{" ["+d.format("yyyy")+"]"}{y}}{info.SpokenLanguages.displayLanguage.contains(/English/) ? '' : " ["+any{(audios.language[1]) ? (csv('C:/FileBot Settings/All/Locales.csv').get(audios.language[0]))+", "+(csv('C:/FileBot Settings/All/Locales.csv').get(audios.language[1])) : (csv('C:/FileBot Settings/All/Locales.csv').get(audios.language[0]))}{(info.SpokenLanguages.displayLanguage.join(', '))}+"]"}{' ['+any{certification} {omdb.certification}.replaceAll(/^\d+$/, 'PG-$0').replaceAll('N A','No Certification')+']'}{" [$minutes Min]"}{" ["+(rating)+"★]"}{" [$vf] [$ac "+af.replace('8ch', '7.1ch').replace('7ch', '6.1ch').replace('6ch', '5.1ch').replace('3ch', '2.1ch').replace('2ch','2.0ch')+"]"}{" ("+actors.take(3).join(', ')+")"}{any{" ("+omdb.genres.take(3).join(', ')+")"}{" ("+genres.take(3).join(', ')+")"}}
cheers