From dea96e4418eec37aa75592fee2a9dd7672a9c108 Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 1 Nov 2019 08:04:50 +0100 Subject: [PATCH] docs: add hint on shell redirections (#5761) --- docs/property/postprocessor.md | 11 +++++++++-- docs/property/postremove.md | 12 ++++++++++-- docs/property/preprocessor.md | 12 ++++++++++-- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/docs/property/postprocessor.md b/docs/property/postprocessor.md index 91fafd96d..869b69ca1 100644 --- a/docs/property/postprocessor.md +++ b/docs/property/postprocessor.md @@ -31,8 +31,15 @@ Format | Description | Example value *Example usage* -To use special characters (e.g. spaces), either put the string in quotes or -escape the individual characters. +To use special characters (e.g. spaces), either put the string in double quotes +or escape the individual characters. ```/path/to/ffmpeg -i "%f" -vcodec libx264 -acodec copy "/path/with white space/%b"``` +The command is executed as-is, without a shell. To redirect command output or +chain commands, wrap the command in a shell, e.g. + +``` +sh -c "df -P -h /recordings >/config/.markers/recording-post-process" +sh -c "df -P -h /recordings | tee /config/.markers/recording-post-process" +``` diff --git a/docs/property/postremove.md b/docs/property/postremove.md index 9ff0565a1..210cf0997 100644 --- a/docs/property/postremove.md +++ b/docs/property/postremove.md @@ -26,7 +26,15 @@ Format | Description | Example value *Example usage* -To use special characters (e.g. spaces), either put the string in quotes or -escape the individual characters. +To use special characters (e.g. spaces), either put the string in double quotes +or escape the individual characters. ```/usr/bin/tvh_file_removed "%f"``` + +The command is executed as-is, without a shell. To redirect command output or +chain commands, wrap the command in a shell, e.g. + +``` +sh -c "df -P -h /recordings >/config/.markers/recording-post-remove" +sh -c "df -P -h /recordings | tee /config/.markers/recording-post-remove" +``` diff --git a/docs/property/preprocessor.md b/docs/property/preprocessor.md index 3f8371dc9..74730231e 100644 --- a/docs/property/preprocessor.md +++ b/docs/property/preprocessor.md @@ -24,7 +24,15 @@ Format | Description | Example value *Example usage* -To use special characters (e.g. spaces), either put the string in quotes or -escape the individual characters. +To use special characters (e.g. spaces), either put the string in double quotes +or escape the individual characters: ```/usr/bin/lcd_show "%f"``` + +The command is executed as-is, without a shell. To redirect command output or +chain commands, wrap the command in a shell, e.g. + +``` +sh -c "df -P -h /recordings >/config/.markers/recording-pre-process" +sh -c "df -P -h /recordings | tee /config/.markers/recording-pre-process" +``` -- 2.47.2