CompTIA Server+ (SK0-005)Server AdministrationMedium

A server administrator needs to write a script to automate a routine task that involves checking system logs for specific errors, processing text files, and interacting with a web API to report status. The script should be relatively easy to write and maintain, and widely supported across different Linux server environments. Which scripting language is the most suitable choice?

  1. AAssembly
  2. BJava
  3. CC++
  4. DPython
Show answer & explanation

Correct answer: D. Python

Python is an excellent choice for server administration scripting due to its readability, extensive standard library, and strong support for text processing, file manipulation, and HTTP requests (for API interaction). It is widely available on Linux distributions and easy to maintain.

Why the other options are wrong

  • A. Assembly language is very low-level, extremely difficult to write and maintain, and completely unsuitable for general server automation scripting.
  • B. Java is a robust, object-oriented language often used for large-scale enterprise applications, but its verbosity and overhead make it less ideal for quick, simple server automation scripts.
  • C. C++ is a compiled language, powerful for system-level programming and performance-critical applications, but overly complex and time-consuming for routine automation scripts.

Python for Server Scripting

A high-level, interpreted programming language widely used in server administration for automation, data processing, and system integration due to its simplicity, readability, and extensive libraries.

  • Easy to learn and read.
  • Rich standard library for system tasks.
  • Cross-platform compatibility.

Memory trick: Python Powers Practical Programs

More Server Administration questions