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.
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)- A2% (1)
- C4% (2)
- D94% (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.
.py files are Python scripts; while Python is widely used in Linux, it's not a shell script type.
.js files are JavaScript files, typically executed in a web browser or Node.js runtime, not directly as a shell script.
.vbs files are VBScript files, primarily used on Windows systems, and are not natively supported as shell scripts in Linux.
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
Community Discussion
No community discussion yet for this question.