1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-25 17:28:51 -05:00
filebot/website/scripts/escape.groovy
2013-09-22 05:30:11 +00:00

8 lines
243 B
Groovy
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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')