How to modify $SERVICEOUTPUT

So you are basically asking how to pick only the first N characters of a string in bash?

That’s quite easy:

echo ${NOTIFY_SERVICEOUTPUT:0:30}

will print the first 30 characters of $NOTIFY_SERVICEOUTPUT. See Shell Parameter Expansion (Bash Reference Manual) for more examples.

From the screenshot you posted it isn’t exactly clear to me who actually sends the SMS. But if it is some Java program, then I’m confident that Java also has some kind of substring function. :wink: