Question

In a POSIX shell script, which construct correctly tests whether variable x is an empty string?

A if [ $x -eq "" ]
B if [ -z "$x" ]
C if (($x == ""))
D if test -n $x
E if expr $x = ""
Practice Next

Hey! Ask a query

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)