Skip to content

Special Parameters #54

Description

@nixpulvis

Section 2.5.2 Special Parameters of the POSIX standard defines a list of special characters we should interpret:

  • ? - Expands to the decimal exit status of the most recent pipeline.
  • - - Expands to the current option flags.
  • $ - Expands to the decimal process ID of the invoked shell.
    In a subshell (see Shell Execution Environment ), '$' shall expand to the same value as that of the current shell.
  • ! - Expands to the decimal process ID of the most recent background command (see Lists) executed from the current shell.
  • 0 - Expands to the name of the shell or shell script.
  • # - Expands to the decimal number of positional parameters.
    • @ - Expands to the positional parameters, starting from one, initially producing one field for each positional parameter that is set.
  • * - Expands to the positional parameters, starting from one, initially producing one field for each positional parameter that is set. Read more in 2.5.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    L1: enhancementNew feature or requestM: programModule: Oursh language(s) with lexers, parsers and evaluation runtimes.T: semanticsTopic: Program evaluation issues or features

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions