I have a string num1="0123456789" num2="56"
I need to get the substring 0123456. I am trying to do
echo "${string#$num2}"
which gives me, 01234 but it doesn't give me 56. Is there any straight forward way to do this without adding something like
substring="${string#$num2}"
result=substring+num2
Thanks.