1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-26 09:48:56 -05:00
filebot/website/scripts/escape.groovy

8 lines
243 B
Groovy
Raw Normal View History

net.sourceforge.filebot.cli.CLILogging.CLILogger.setLevel(java.util.logging.Level.OFF)
console.printf('Enter: ')
def s = console.readLine()
// $, `, or \
console.printf('%n"' + s.replaceAll('["$`\\\\]', {'\\'+it}) + '"%n')