I'm writing a script searching for directories in a subtree and appending them to incrontab. I can even add folder names with blanks by escaping those with a backslash:
/path/to/observed\ directory IN_ALL_EVENTS /path/to/script.sh "\$@" "\$#" "\$%"
However, I have no clue how to add a folder containing a line feed character. None of the following works:
/path/to/observed\ndirectory IN_ALL_EVENTS /path/to/script.sh "\$@" "\$#" "\$%"
/path/to/observed\
directory IN_ALL_EVENTS /path/to/script.sh "\$@" "\$#" "\$%"
"/path/to/observed
directory IN_ALL_EVENTS /path/to/script.sh" "\$@" "\$#" "\$%"
Is there any possibility to get it work?