I am using the following bash script to update an email address "[email protected]" but the problem I have is that the field could be anything, not necessary "[email protected]" I have tried to use '*' instead, how can I run the following to work for whatever the current email is set as under "emailaddress" field?
#! bin/bash
updatevar="UPDATE email_users SET emailaddress = REPLACE(emailaddress, '[email protected]', 'admin@$(hostname)');"
mysql --user=root --password=PASSWORD DATABASE << eof
$updatevar
eof