invocation-option
bash -c
Execute a command string. The following argument becomes $0; subsequent arguments become positional parameters.
Formal Syntax & Structure
bash syntaxbash
bash -c command [name [args ...]]Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| command | string | Trusted command string. |
| name | string | Value for $0. |
Return Value
exit status
Execute a command string. The following argument becomes $0; subsequent arguments become positional parameters.
Working Example
Example Snippetbash
bash --noprofile --norc -c 'printf "%s\n" "$0" "$1"' report 'daily report'