Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
6 changed files
with
69 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 14 additions & 7 deletions
21
docs/templates/content/advanced/script-escaping-special-characters.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,32 @@ | ||
# Quoting and escaping shell script arguments | ||
|
||
## Bash script (${bash_script_name}) | ||
## Running the Bash script (${bash_script_name}) on Linux or Mac | ||
|
||
The recommended environment for running ${bash_script_name} on Linux or Mac is Bash. | ||
|
||
When an argument contains a space, you should wrap the argument with escaped quotes. | ||
|
||
For example: | ||
|
||
detect.sh --detect.project.name=\"Project Test\" | ||
detect.sh --detect.project.name=\"Project Test\" | ||
|
||
When an argument contains a special character (for example, an exclamation point) you must | ||
escape the character with a backslash. The backslash should precede the escaped character. | ||
|
||
For example: | ||
|
||
detect.sh --detect.project.name=Project\!Test | ||
detect.sh --detect.project.name=Project\!Test | ||
|
||
## Running the PowerShell script (${powershell_script_name}) on Windows | ||
|
||
## PowerShell script (${powershell_script_name}) | ||
The recommended environment for running ${powershell_script_name} on Windows is the [Windows Command Prompt](https://en.wikipedia.org/wiki/Cmd.exe). | ||
|
||
When an argument contains a space, comma or other special character, you should escape the character with a back quote. The back quote should precede the escaped character. | ||
|
||
For example: | ||
|
||
detect.ps1 --detect.project.name=Project` Test | ||
detect.ps1 --detect.signature.scanner.paths=path1`,path2 | ||
``` | ||
detect.ps1 --detect.project.name=Project` Test | ||
``` | ||
``` | ||
detect.ps1 --detect.signature.scanner.paths=path1`,path2 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters