Extract $length characters of substring from $string at $position.
-
${string:position:length}
-
${string:length:position}
-
${string:length-position}
-
${string::length::position}
A
Correct answer
Explanation
Bash substring expansion uses the syntax ${parameter:offset:length}. Here, ${string:position:length} correctly extracts length characters starting from the 0-indexed position. The other options are incorrect because they use wrong parameter ordering or invalid syntax separators that will cause shell errors.