Soru

Zorluk: KolayBasic Scripting Languages and Constructs

A system administrator is creating an automated maintenance script to run natively within the default command-line terminal environment of a macOS workstation. Which file extension should the administrator assign to this script?

  1. .shCevap
  2. B
    .bat
  3. C
    .ps1
  4. D
    .vbs

Cevap

The `.sh` file extension should be used for native shell scripts executed in a macOS terminal environment.
The `.sh` file extension is standard for shell scripts created to execute in Unix-like terminal environments, including macOS (which uses Zsh and Bash) and Linux.

Adım Adım Çözüm

1
Identify the target operating system environment specified in the scenario.
The target operating system is macOS using a native command-line terminal.
macOS is a Unix-based operating system.
2
Determine the standard scripting extension associated with native Unix/macOS shell environments (such as Zsh or Bash).
Shell scripts running in these environments conventionally use the `.sh` file extension.
Scripting extensions specify the engine or runtime host meant to interpret the script.

Anahtar Kavram

Scripting Language File Extensions and Execution Environments
Bu soruyu puanla