I'm trying to use a bash script to sanitize a database and I need to use the largest ID Number from the users table so I have this line in my script
MAXID=$(mysql -u root -proot elis27 -e "select max(idnumber) from mdl_user;")
echo $MAXID
And the output of that line in my script is
max(idnumber) 3
How can I parse the output of the mysql command so that MAXID is just 3?