In a bash script, what is the keyword used to output to the terminal
echo
In a bash script, to output the results of 5*5 what would be the correct syntax
echo $((5*5))
In bash how is a function named test declared
test() {
When executing a bash function that accepts 3 inputs by using the following command
test "word" 54 1
What is the value of $2
54
In bash, what is the syntax to create a function called math with 2 parameters
math() {
What is the syntax to create a while loop that will output the value of y as long as it is lower than 10
y=0
while [$y -lt 10]; do
echo $y
((y++))
done
in a bash script what is a valid method of incrementing the integer i by 1
i++
A bash loop uses an array called months. What is the correct syntax to create the array?
months=("Jan" "Feb" "Mar" "Apr" "May")
A bash loop has the following command:
for x in "${months[@]}"; do …
What does ${months[@]} achieve
this defines the array "months" and uses the @ symbol to indicate each value of the array
In bash, when creating a conditional statement with 3 conditions, what is the correct order of commands?
if <condition>
elif <condition>
else <condition>
fi