Differences between revisions 3 and 5 (spanning 2 versions)
Revision 3 as of 2017-10-20 00:36:02
Size: 102
Comment:
Revision 5 as of 2017-10-21 18:57:02
Size: 146
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from bash/invocation/options #pragma section-numbers 1
<<TableOfContents>>
 * [[../|Invocation]]
=== Invocation Options ===
Line 3: Line 6:
 * Invocation Options
 * [[../|Invocation]]
<<Include(/c, "-c", 4, from="^----$")>>

1. Invocation Options


1.1. -c

-c [options] -- CommandString [ARG0 [ARG...]]

  • commands are read from the first non-option argument (required)
  • $0 is set as the second non-option argument defaulting to "bash"

  • all remaining non-option arguments are assigned to the positional parameters starting at $1

  • [[ $- =~ c ]] will return true

bash/invocation/option (last edited 2017-10-21 20:06:57 by Robert Robertson)