var=abcdef

echo ${var:7}
echo ${var:6}
echo ${var:5}
echo ${var:1}
echo ${var:0}
echo ${var:-1}

echo ${var:1:4}
echo ${var:0:4}
echo ${var::4}
echo ${var:-1:4}

echo ${var:1:7}
echo ${var:0:7}
echo ${var::7}
echo ${var:-1:7}