220-1101-AND-220-1102 practice question 28 of 35
A developer is creating a shell script to automate basic tasks in Linux. Which of the following file types are supported by default?
Full set: 800 questionsIn the Linux operating system, the standard and conventional file extension for a shell script is .sh. Shell scripts are text files containing a series of commands that are executed by a command-line interpreter, such as Bash (Bourne-Again SHell). While Linux can execute a script file regardless of its extension if it has the correct permissions and a valid shebang (e.g., #!/bin/bash) on the first line, the .sh extension is the universally recognized convention for identifying these files by default for developers and system administrators.
A. .py is the extension for Python scripts, which are executed by the Python interpreter, not a native command-line shell.
B. .js is the extension for JavaScript files, which are typically executed by a web browser's engine or a server-side environment like Node.js.
C. .vbs is the extension for VBScript files, a scripting language developed by Microsoft and primarily used within the Windows operating system.
1. University Courseware: Michigan Technological University, Department of Computer Science. (n.d.). Linux Shell Scripting Tutorial v1.0.0. Section 1.2, "Creating and Running a Shell Script". The document states, "It is a convention to give shell scripts an extension of .sh". Retrieved from https://pages.mtu.edu/~shene/NSF-3/e-Book/SHELL/slide-part-1.pdf
2. Official Vendor Documentation: Red Hat. (2022). Red Hat Enterprise Linux 8: Configuring basic system settings. Chapter 26, "Writing a simple shell script". All examples provided in this official documentation, such as myscript.sh, use the .sh extension. Retrieved from https://access.redhat.com/documentation/en-us/redhatenterpriselinux/8/html/configuringbasicsystemsettings/writing-a-simple-shell-scriptconfiguring-basic-system-settings
3. Official Project Documentation: The Linux Documentation Project. (2014). Bash Guide for Beginners. Chapter 1.2, "What is a shell script?". The guide consistently uses the .sh extension in its examples to denote shell scripts, establishing it as the standard convention. Retrieved from https://tldp.org/LDP/Bash-Beginners-Guide/html/sect0102.html
Keep practicing
Take the free 220-1101-AND-220-1102 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 220-1101-AND-220-1102 practice questions
- Question 1A large organization is researching proprietary software with vendor support for a multiu…
- Question 2A technician suspects a rootkit has been installed and needs to be removed. Which of the …
- Question 3A technician needs to ensure that USB devices are not suspended by the operating system W…
- Question 4A technician is troubleshooting a mobile device that was dropped. The technician finds th…
- Question 5A technician needs to access a Windows 10 desktop on the network in a SOHO using RDP. Alt…
- Question 6A systems administrator is setting up a Windows computer for a new user Corporate policy …
