nerdexam
CompTIA

220-1102 · Question #117

A developer is creating a shell script to automate basic tasks in Linux. Which of the following file types are supported by default?

The correct answer is D. .sh. For automating tasks in Linux using shell scripts, the .sh file extension is the standard and most commonly supported type, typically executed by Bash or other shell interpreters.

Operating Systems

Question

A developer is creating a shell script to automate basic tasks in Linux. Which of the following file types are supported by default?

Options

  • A.py
  • B.js
  • C.vbs
  • D.sh

How the community answered

(51 responses)
  • A
    2% (1)
  • C
    4% (2)
  • D
    94% (48)

Why each option

For automating tasks in Linux using shell scripts, the .sh file extension is the standard and most commonly supported type, typically executed by Bash or other shell interpreters.

A.py

.py files are Python scripts; while Python is widely used in Linux, it's not a shell script type.

B.js

.js files are JavaScript files, typically executed in a web browser or Node.js runtime, not directly as a shell script.

C.vbs

.vbs files are VBScript files, primarily used on Windows systems, and are not natively supported as shell scripts in Linux.

D.shCorrect

The .sh file extension is the conventional and widely supported default for shell scripts in Linux environments. These scripts are typically executed by a shell interpreter like Bash, which is the default shell on most Linux distributions, allowing for automation of various system tasks.

Concept tested: Linux shell script file types

Source: https://www.gnu.org/software/bash/manual/bash.html

Topics

#Linux#Shell scripting#File types#Automation

Community Discussion

No community discussion yet for this question.

Full 220-1102 Practice