18 real Conditionals & Tests questions from the Bash bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.
1. What is Test command?
Junior
A.the dash-prefixed mnemonics like eq, ne, lt, and gt used to compare integers rather than strings inside a test
B.the original conditional primitive, also spelled as a single open bracket, that evaluates file, string, and numeric expressions and sets an exit status
C.the integer a command returns where zero signals success and any nonzero value signals failure, used to drive if and while
D.the equals sign inside a conditional that compares two text values for an exact match rather than arithmetic value
2. Which term means: "the original conditional primitive, also spelled as a single open bracket, that evaluates file, string, and numeric expressions and sets an exit status"?
A.Test command — the integer a command returns where zero signals success and any nonzero value signals failure, used to drive if and while
B.Test command — the original conditional primitive, also spelled as a single open bracket, that evaluates file, string, and numeric expressions and sets an exit status
C.Test command — the and-and and or-or chaining symbols that run the next command only based on the previous command's success or failure
D.Test command — the dash-prefixed mnemonics like eq, ne, lt, and gt used to compare integers rather than strings inside a test
A.the and-and and or-or chaining symbols that run the next command only based on the previous command's success or failure
B.the original conditional primitive, also spelled as a single open bracket, that evaluates file, string, and numeric expressions and sets an exit status
C.the integer a command returns where zero signals success and any nonzero value signals failure, used to drive if and while
D.a modern keyword conditional that adds pattern matching and logical operators while avoiding word splitting and glob expansion of unquoted variables
5. Which term means: "a modern keyword conditional that adds pattern matching and logical operators while avoiding word splitting and glob expansion of unquoted variables"?
A.Double bracket construct — the equals sign inside a conditional that compares two text values for an exact match rather than arithmetic value
B.Double bracket construct — the and-and and or-or chaining symbols that run the next command only based on the previous command's success or failure
C.Double bracket construct — the original conditional primitive, also spelled as a single open bracket, that evaluates file, string, and numeric expressions and sets an exit status
D.Double bracket construct — a modern keyword conditional that adds pattern matching and logical operators while avoiding word splitting and glob expansion of unquoted variables
A.a modern keyword conditional that adds pattern matching and logical operators while avoiding word splitting and glob expansion of unquoted variables
B.the original conditional primitive, also spelled as a single open bracket, that evaluates file, string, and numeric expressions and sets an exit status
C.the and-and and or-or chaining symbols that run the next command only based on the previous command's success or failure
D.the dash-prefixed mnemonics like eq, ne, lt, and gt used to compare integers rather than strings inside a test
A.Numeric comparison operators — the equals sign inside a conditional that compares two text values for an exact match rather than arithmetic value
B.Numeric comparison operators — the original conditional primitive, also spelled as a single open bracket, that evaluates file, string, and numeric expressions and sets an exit status
C.Numeric comparison operators — the dash-prefixed mnemonics like eq, ne, lt, and gt used to compare integers rather than strings inside a test
D.Numeric comparison operators — the integer a command returns where zero signals success and any nonzero value signals failure, used to drive if and while
A.the integer a command returns where zero signals success and any nonzero value signals failure, used to drive if and while
B.the and-and and or-or chaining symbols that run the next command only based on the previous command's success or failure
C.the original conditional primitive, also spelled as a single open bracket, that evaluates file, string, and numeric expressions and sets an exit status
D.the equals sign inside a conditional that compares two text values for an exact match rather than arithmetic value
A.String equality operator — the equals sign inside a conditional that compares two text values for an exact match rather than arithmetic value
B.String equality operator — the dash-prefixed mnemonics like eq, ne, lt, and gt used to compare integers rather than strings inside a test
C.String equality operator — the integer a command returns where zero signals success and any nonzero value signals failure, used to drive if and while
D.String equality operator — the original conditional primitive, also spelled as a single open bracket, that evaluates file, string, and numeric expressions and sets an exit status
A.the integer a command returns where zero signals success and any nonzero value signals failure, used to drive if and while
B.the original conditional primitive, also spelled as a single open bracket, that evaluates file, string, and numeric expressions and sets an exit status
C.the dash-prefixed mnemonics like eq, ne, lt, and gt used to compare integers rather than strings inside a test
D.the equals sign inside a conditional that compares two text values for an exact match rather than arithmetic value
A.Exit status — the dash-prefixed mnemonics like eq, ne, lt, and gt used to compare integers rather than strings inside a test
B.Exit status — the integer a command returns where zero signals success and any nonzero value signals failure, used to drive if and while
C.Exit status — the and-and and or-or chaining symbols that run the next command only based on the previous command's success or failure
D.Exit status — a modern keyword conditional that adds pattern matching and logical operators while avoiding word splitting and glob expansion of unquoted variables
A.Short-circuit operators — the equals sign inside a conditional that compares two text values for an exact match rather than arithmetic value
B.Short-circuit operators — the and-and and or-or chaining symbols that run the next command only based on the previous command's success or failure
C.Short-circuit operators — a modern keyword conditional that adds pattern matching and logical operators while avoiding word splitting and glob expansion of unquoted variables
D.Short-circuit operators — the dash-prefixed mnemonics like eq, ne, lt, and gt used to compare integers rather than strings inside a test
Answers, AI explanations, and a scored voice mock interview
Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.