Differences between revisions 4 and 5
Revision 4 as of 2017-10-21 17:43:53
Size: 189
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 3: Line 3:
 * [[../|Invocation]]
Line 4: Line 5:
 * [[../|Invocation]]
Line 6: Line 6:
 * Invocation Options
<<Include(^bash/invocation/option/.*, , 4, from="^----$")>>
<<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)