SyntaxFix
Write A Post
Hire A Developer
Questions
If you're in bash, you can say:
bash
bash-3.2$ var=abcd bash-3.2$ echo ${var:0:2} ab
This may be just what you need…