Extract a section of text from a text string. The extracted text string is stored in an environment variable called SUBSTR.
SUBSTR pos size [text]
pos Position to start extracting text from, where the first character is at position 1, the second character is at position 2 and so on. size Number of characters to extract. text Sequence of characters.
Parameter pos can also be negative. The last character is at position -1, the second last character is -2 and so on.
Examples on using SUBSTR.