examples/shell/substring.sh

#!/bin/bash

text="Hello World!"
echo $text

first=${text:0:4}
echo $first



middle=${text:4:4}
echo $middle

Hello World!
Hell
o Wo