Questions
IWBS001 Sample Exam Questions- Requires Respondus LockDown Browser
Single choice
Given the following shell variable assignments, a=10; b=5; c=3 Which of the following conditions is true?
Options
A.[ $c = ( 5 – 2 ) ]
B.[ b –gt 1 ]
C.[ $a –eq 10 –a $b –gt 5 ]
D.[ $a –le 10 ]
View Explanation
Verified Answer
Please login to view
Step-by-Step Analysis
Question restatement: Given the shell variable assignments a=10; b=5; c=3, which of the following conditions is true?
Option 1: [ $c = ( 5 – 2 ) ]
- This tries to compare c to the result of ( 5 – 2 ). In shell, the expression ( 5 – 2 ) is not a valid arithmetic expression inside [ ... ]; arithmetic should be performed with $(( ... )) or inside let. Even if you intended arit......Login to view full explanationLog in for full answers
We've collected over 50,000 authentic exam questions and detailed explanations from around the globe. Log in now and get instant access to the answers!
Similar Questions
Given the following shell variable assignments, a=6; b=10; c=15 Which of the following conditions is true?
Given the following shell variable assignments, a=2; b=5; c=10 Which of the following conditions is true?
Which of the following shell scripts (if any) correctly prints TRUE if x and y are both equal to 10? Select all that apply.
The expression "if [ $count -gt 0 ]" checks if count is .....
More Practical Tools for International Students
Making Your Study Simpler
Join us and instantly unlock extensive past papers & exclusive solutions to get a head start on your studies!