ยง2024-11-01
- wildduck/emails/00-example.json
{
"disabled": true,
"flag": true,
"from": {
"name": "WildDuck Support",
"address": "info@[DOMAIN]"
},
"to": {
"name": "[NAME]",
"address": "[EMAIL]"
},
"subject": "[FNAME], welcome to our awesome service!"
}
-
enable example message
- sed -i -e 's/"disabled": true/"disabled": false/g' /opt/wildduck/emails/00-example.json
-
The command you provided uses sed, a stream editor for filtering and transforming text. Here's a breakdown of the command:
- sed: The command itself, used for text processing.
- -i: This option tells sed to edit files in place. That means it will modify the original file directly rather than outputting the changes to the console or a new file.
- -e: This option allows you to specify the script to be executed. In this case, it indicates that the following argument is a sed script.
- 's/"disabled": true/"disabled": false/g': This is the sed script itself:
- s: Stands for "substitute," indicating that we want to replace text.
- /"disabled": true/: This is the pattern we want to match. It looks for the string "disabled": true.
- /"disabled": false/: This is the replacement string, specifying that we want to replace matches of the first string with this.
- g: Stands for "global," meaning that the substitution should happen for all occurrences in each line of the file, not just the first one.
- /opt/wildduck/emails/00-example.json: This is the path to the file that sed will modify.