I tried searching for this and couldn't quite find what I was looking for.
I have a variable in Bash/Shell that contains an email address. I would like to extract everything that comes before the "@" sign and put that into a new variable.
So user@example.com
should be just user
.
All the string manipulation looks for a length and position. The position should always be 0, but I really need to find that "@" token.