I have a output stored in a variable that comes from a .jar
script
Token is: XYZ123
Not found in page: 0
Not found in page: 1
Not found in page: 2
Found with ID : #14214733
Now I want to extract the ID after #
i.e 14214733
and want to store it in another variable, how do I do that in bash?
EDIT: Solved using echo ${var##*#}
echo
your variable here? Wouldn'techo ${variable##*#}
work ?echo $var
produces the above output as a whole, now I want to get the last ID