2026 QUESTIONS WITH SOLUTIONS
GRADED A+
◉ While writing a shell script, you want to perform some arithmetic
operations.
Which of the following commands is used to create an integer
variable?
Answer: declare -i variablename
◉ You want to create a variable called marketing that has a value of
TestOut. You want this variable to be available each time a new shell
environment is spawned as a process.
Which of the following commands will meet your requirements?
Answer: declare -x marketing=TestOut
◉ You have created a breakfast variable with a value of "yogurt and
granola."
What command would you enter to only display "granola" from the
shell command prompt?
Answer: echo ${breakfast:11}