18 real Special Variables 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 Exit code variable?
Junior
A.the special parameter holding the numeric result of the most recently completed foreground command, read as dollar-question-mark
B.the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero
C.the special parameter that expands to how many positional arguments were supplied, read as dollar-hash
D.the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star
2. Which term means: "the special parameter holding the numeric result of the most recently completed foreground command, read as dollar-question-mark"?
A.Exit code variable — the special parameter holding the numeric result of the most recently completed foreground command, read as dollar-question-mark
B.Exit code variable — the special parameter that expands to how many positional arguments were supplied, read as dollar-hash
C.Exit code variable — the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero
D.Exit code variable — the special parameter holding the process id of the most recently started asynchronous command, read as dollar-bang
A.Script name variable — the special parameter holding the numeric result of the most recently completed foreground command, read as dollar-question-mark
B.Script name variable — the parameter that, when double quoted, expands to each positional argument as its own separate word, written as dollar-at
C.Script name variable — the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star
D.Script name variable — the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero
A.the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star
B.the special parameter that expands to how many positional arguments were supplied, read as dollar-hash
C.the special parameter holding the process id of the most recently started asynchronous command, read as dollar-bang
D.the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero
A.Argument count variable — the special parameter that expands to how many positional arguments were supplied, read as dollar-hash
B.Argument count variable — the parameter that, when double quoted, expands to each positional argument as its own separate word, written as dollar-at
C.Argument count variable — the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star
D.Argument count variable — the special parameter holding the process id of the most recently started asynchronous command, read as dollar-bang
A.the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero
B.the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star
C.the parameter that, when double quoted, expands to each positional argument as its own separate word, written as dollar-at
D.the special parameter holding the process id of the most recently started asynchronous command, read as dollar-bang
A.Quoted all-arguments array — the parameter that, when double quoted, expands to each positional argument as its own separate word, written as dollar-at
B.Quoted all-arguments array — the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero
C.Quoted all-arguments array — the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star
D.Quoted all-arguments array — the special parameter holding the numeric result of the most recently completed foreground command, read as dollar-question-mark
A.the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star
B.the special parameter that expands to how many positional arguments were supplied, read as dollar-hash
C.the parameter that, when double quoted, expands to each positional argument as its own separate word, written as dollar-at
D.the special parameter holding the process id of the most recently started asynchronous command, read as dollar-bang
14. Which term means: "the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star"?
A.Joined all-arguments string — the special parameter that expands to how many positional arguments were supplied, read as dollar-hash
B.Joined all-arguments string — the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star
C.Joined all-arguments string — the special parameter holding the numeric result of the most recently completed foreground command, read as dollar-question-mark
D.Joined all-arguments string — the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero
A.the special parameter holding the process id of the most recently started asynchronous command, read as dollar-bang
B.the parameter that, when double quoted, fuses every positional argument into one word joined by the first field-separator character, written as dollar-star
C.the special parameter holding the numeric result of the most recently completed foreground command, read as dollar-question-mark
D.the special parameter that expands to the name the current script or shell was invoked under, read as dollar-zero
A.Background PID variable — the special parameter holding the numeric result of the most recently completed foreground command, read as dollar-question-mark
B.Background PID variable — the special parameter that expands to how many positional arguments were supplied, read as dollar-hash
C.Background PID variable — the special parameter holding the process id of the most recently started asynchronous command, read as dollar-bang
D.Background PID variable — the parameter that, when double quoted, expands to each positional argument as its own separate word, written as dollar-at
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.