SyntaxFix
Write A Post
Hire A Developer
Questions
You can use tail:
tail
$ foo="1234567890" $ echo -n $foo | tail -c 3 890
A somewhat roundabout way to get the last three characters would be to say:
echo $foo | rev | cut -c1-3 | rev