[bash] sortName not working correctly in command-line argument

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
ncaine
Posts: 2
Joined: 30 Aug 2018, 23:13

[bash] sortName not working correctly in command-line argument

Post by ncaine »

I've been using the Filebot UI to organise all my existing media but am now trying to write a script for automation of renaming / organisation of new media.

I'm using Debian Linux with Filebot in a docker (rednoah/filebot) for context.

The script runs perfectly aside from sortName functionality which is dropping the name of the TV series completely just leaving punctuation marks at the series folder level.

If I use {n.sortName} for example on the TV Show The Wire, it will return - Wire/Season 01/... - if I then adjust it to {n.sortName('$2, $1') it will return - , /Season 01/... -

Have been scouring the forums for a solution or someone with a similar issue but have had no luck. Understand that there is an issue with $ symbol on Linux from previous posts.

Have tried this format from another post which returns the same.

Code: Select all

seriesFormat="{n.replaceFirst(/^(?i)(The|A)\s(.+))/, /$2, $1/)}"
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [sortName] Not working correctly

Post by rednoah »

Please read this:
viewtopic.php?f=4&t=1899

:idea: You'll learn all the necessary basics, and should have a A-HA! moment at some point. ;)
:idea: Please read the FAQ and How to Request Help.
ncaine
Posts: 2
Joined: 30 Aug 2018, 23:13

Re: [bash] sortName not working correctly in command-line argument

Post by ncaine »

Superstar!

Had to flip the slashes :roll:
Post Reply