Hiring guide for Bash Engineers

Bash Developer Hiring Guide

Bash, an acronym for Bourne Again SHell, is a Unix shell and command language created by Brian Fox for the GNU Project in 1989. It is a free software replacement for the Bourne shell (sh), originally developed by Stephen Bourne for AT&T's Unix version 7 in 1979. Bash is a powerful programming language, providing complete control over UNIX/Linux systems, and is widely used for its command line interface (CLI) scripting capabilities. It is the default shell for most UNIX systems, including Linux and macOS, and has been ported to Microsoft Windows and distributed with Cygwin and MinGW. Bash's features include programmable command-line completion, command-line editing, and a history mechanism.

Ask the right questions secure the right Bash talent among an increasingly shrinking pool of talent.

First 20 minutes

General Bash app knowledge and experience

The first 20 minutes of the interview should seek to understand the candidate's general background in Bash application development, including their experience with various programming languages, databases, and their approach to designing scalable and maintainable systems.

How would you create a variable in Bash?
You can create a variable in Bash by using the equals sign with no spaces, like this: variableName=value.
What are the basic data types in Bash?
Bash only supports one data type, which is a string. Even when you are using numbers, they are still treated as strings.
How would you write a for loop in Bash?
A for loop in Bash can be written as follows: for i in {1..10}; do echo $i; done. This will print the numbers 1 to 10.
What is the purpose of the 'echo' command in Bash?
The 'echo' command in Bash is used to print output to the terminal. It can be used to display text or the value of a variable.
How would you write a conditional statement in Bash?
A conditional statement in Bash can be written using if, then, else, and fi. For example: if [ $a -gt $b ]; then echo 'a is greater than b'; else echo 'b is greater than a'; fi.
The hiring guide has been successfully sent to your email address.
Oops! Something went wrong while submitting the form.

What you’re looking for early on

Has the candidate shown knowledge of Bash scripting syntax and commands?
Did the candidate demonstrate understanding of Linux/Unix shell environments?
Does the candidate have experience with shell script debugging?
Was the candidate able to explain how they would automate tasks using Bash?

Next 20 minutes

Specific Bash development questions

The next 20 minutes of the interview should focus on the candidate's expertise with specific backend frameworks, their understanding of RESTful APIs, and their experience in handling data storage and retrieval efficiently.

Describe the difference between a function and a script in Bash.
A script is a file that contains a sequence of commands for a Unix-based operating system. A function, on the other hand, is a group of commands that is given a name and can be called from anywhere within the script.
How would you pass arguments to a Bash script?
Arguments can be passed to a Bash script after the script name, separated by spaces. Inside the script, they can be accessed as $1, $2, etc.
What are the different ways to execute a Bash script?
A Bash script can be executed by either giving it execute permissions using the chmod command and then running it directly, or by passing the script name as an argument to the Bash command.
Describe the difference between 'source' and '.' in Bash.
'source' and '.' are both commands in Bash that are used to read and execute commands from a file in the current shell environment. There is no difference between them except for their name.
How would you handle errors in a Bash script?
Errors in a Bash script can be handled using the 'set' command with the '-e' option, which causes the script to exit when a command fails. You can also use conditional statements to check the status of a command and take appropriate action.
The hiring guide has been successfully sent to your email address.
Oops! Something went wrong while submitting the form.

The ideal back-end app developer

What you’re looking to see on the Bash engineer at this point.

At this point, a skilled Bash engineer should demonstrate strong problem-solving abilities, proficiency in Bash programming language, and knowledge of software development methodologies. Red flags include lack of hands-on experience, inability to articulate complex concepts, or unfamiliarity with standard coding practices.

Digging deeper

Code questions

These will help you see the candidate's real-world development capabilities with Bash.

What does the following simple bash script do?
#!/bin/bash

 echo 'Hello, World!'
This bash script prints 'Hello, World!' to the console.
What will be the output of the following bash script?
#!/bin/bash

var='Hello, World!'
echo $var
The script will output 'Hello, World!'. The variable 'var' is assigned the string 'Hello, World!', which is then printed to the console.
What does the following bash script do with an array?
#!/bin/bash

array=('one' 'two' 'three')
for i in "${array[@]}"
do
  echo $i
done
This script creates an array with three elements 'one', 'two', and 'three'. It then iterates over each element in the array and prints it to the console.
What does the following bash script do related to threading or concurrency?
#!/bin/bash

(echo 'Hello, World!' &)
This script runs the command 'echo 'Hello, World!'' in the background as a separate process. The parentheses create a subshell for the command, and the ampersand '&' causes the command to run in the background.

Wrap-up questions

Final candidate for Bash Developer role questions

The final few questions should evaluate the candidate's teamwork, communication, and problem-solving skills. Additionally, assess their knowledge of microservices architecture, serverless computing, and how they handle Bash application deployments. Inquire about their experience in handling system failures and their approach to debugging and troubleshooting.

What is the purpose of the 'trap' command in Bash?
The 'trap' command in Bash is used to specify commands that will be executed when a signal is received by the script. This can be used to perform cleanup tasks before the script exits.
How would you debug a Bash script?
You can debug a Bash script by running it with the '-x' option, which prints each command to the terminal before it is executed. You can also use the 'set' command with the '-x' option to enable debugging for part of the script.
Describe the difference between '$*' and '$@' in Bash.
Both '$*' and '$@' are used to refer to all arguments passed to a script. The difference is in how they handle arguments that contain spaces. '$*' treats the entire set of positional parameters as a single string, while '$@' treats each argument as a separate string.

Bash application related

Product Perfect's Bash development capabilities

Beyond hiring for your Bash engineering team, you may be in the market for additional help. Product Perfect provides seasoned expertise in Bash projects, and can engage in multiple capacities.