SyntaxFix
Write A Post
Hire A Developer
Questions
You were so close! Here is the easiest solution: NEWTESTSTRING=$(echo ${TESTSTRINGONE::5})
NEWTESTSTRING=$(echo ${TESTSTRINGONE::5})
So for your example:
$ TESTSTRINGONE="MOTEST" $ NEWTESTSTRING=$(echo ${TESTSTRINGONE::5}) $ echo $NEWTESTSTRING MOTES