Posted on

Linux LX0-104 Exam 2 samples – Question 8

Which of the following commands creates a function in Bash that outputs the sum of two numbers?

A. function sumitup { echo $(($1 + $2)) ; }
B. command sumitup { echo $(($1 + $2)) ; }
C. function sumitup { echo $1 + $2 ; }
D. method sumitup { echo $1 + $2 ; }
E. command sumitup { echo $1 + $2 ; }

Correct Answer: A
Section: Shells, Scripting and Data Management

Leave a Reply

Your email address will not be published. Required fields are marked *