InterviewStack.io LogoInterviewStack.io

Shell Scripting and Automation Questions

Automating tasks with the command line: Bash and shell scripting, pipes and redirection, text processing, and writing custom tooling and monitoring scripts to glue systems together. Covers the scripting fundamentals infrastructure and platform engineers use daily, including automation-oriented use of general-purpose scripting. Distinct from application programming in its throwaway-to-durable tooling mindset.

HardTechnical
20 practiced

Security events arrive as nested JSON documents whose schema changes over time. Write code that parses the events, preserves unknown fields, normalizes a stable subset into a common object, and rejects only truly invalid records. How would you design the code to remain compatible with new fields added later?

EasyTechnical
20 practiced

Write a Python function that processes a list of authentication log lines and returns the top 3 source IPs by number of failed login attempts in the last 24 hours. The input may contain malformed lines, duplicate events, and mixed timestamp formats. Explain how you would keep the solution maintainable and how you would test the parser.

MediumTechnical
19 practiced

Write a script that compares a baseline security configuration against the current state of a host and reports drift in a human-readable summary plus machine-readable JSON. The baseline may contain nested sections, missing keys, and default values. How would you model the comparison so that it is easy to extend?

HardSystem Design
19 practiced

Design and implement a Python pipeline that takes raw security logs and enriches each event with asset owner, geolocation, and threat-intel labels from local lookup tables. The input can be millions of lines, so your solution must minimize memory use and handle partial lookup failures gracefully. How would you structure the pipeline and measure correctness?

HardSystem Design
18 practiced

Multiple alerts may describe the same incident from different tools. Design an algorithm that correlates alerts into incidents based on shared entities, time proximity, and severity, then assigns a stable incident identifier. What heuristics would you use to balance recall versus precision?

Unlock Full Question Bank

Get access to all 30 Shell Scripting and Automation interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.