Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Arista Exam ACE-P-ALE1.04 Topic 7 Question 96 Discussion

Actual exam question for Arista's ACE-P-ALE1.04 exam
Question #: 96
Topic #: 7
[All ACE-P-ALE1.04 Questions]

In bash scripting, which of the following comparison operators are used on strings?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Magda
1 months ago
I bet the correct answer is 'All of the above' just to really mess with us.
upvoted 0 times
Jeanice
2 days ago
C) == is the correct operator for string comparison.
upvoted 0 times
...
Colene
13 days ago
B) -eq is used for numerical comparison, not strings.
upvoted 0 times
...
Nadine
16 days ago
A) -gt is used for numerical comparison, not strings.
upvoted 0 times
...
...
Kami
1 months ago
Bash scripting, where the rules are made up and the logic doesn't matter!
upvoted 0 times
...
Shad
2 months ago
E) -f ? Come on, that's for checking if a file exists, not comparing strings. These options are making my head spin!
upvoted 0 times
Junita
7 days ago
E) -f is indeed for checking if a file exists, not for comparing strings.
upvoted 0 times
...
Evan
9 days ago
C) == is also used for checking if two strings are equal.
upvoted 0 times
...
Dana
17 days ago
B) -eq is used for checking if two strings are equal.
upvoted 0 times
...
Roosevelt
20 days ago
A) -gt is used for comparing strings based on their ASCII value.
upvoted 0 times
...
...
Asuncion
2 months ago
D) <= ? Really? I guess the exam writers are trying to trick us. That's just plain wrong for string comparisons in Bash.
upvoted 0 times
...
Lennie
2 months ago
Hmm, I was leaning towards B) -eq, but now I'm not so sure. Strings and numbers are so confusing in Bash sometimes.
upvoted 0 times
Rossana
18 days ago
Don't worry, it can be confusing at first, but you'll get the hang of it!
upvoted 0 times
...
Sherita
1 months ago
C) == is the correct operator for comparing strings in bash scripting.
upvoted 0 times
...
Hyun
1 months ago
A) -gt is used for comparing numbers, not strings.
upvoted 0 times
...
...
Dong
2 months ago
I think the correct answer is C) ==. Bash uses the == operator for string comparisons, not the numeric comparison operators like -gt or -eq.
upvoted 0 times
Yuette
1 months ago
Yes, you are correct. The == operator is specifically used for comparing strings in bash.
upvoted 0 times
...
Arminda
1 months ago
I agree, the correct answer is C) ==. It is used for string comparisons in bash scripting.
upvoted 0 times
...
...
Lucille
2 months ago
I'm not sure, but I think -f is used for checking if a file exists.
upvoted 0 times
...
Amie
2 months ago
I agree with Miles, == is used for comparing strings in bash scripting.
upvoted 0 times
...
Miles
2 months ago
I think the correct answer is C) == because it is used for string comparison.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77