Assigning a value to a variable is as follows:
Code:
val=1
valnext=something
Remove the space between the = and your backticked command:
Code:
#!/bin/sh
#
sqlcount=`mysql --host=host --user=user --password=apassword --silent --skip_column_names -e"SELECT count(*) as Users_Logged_On FROM user_logon u WHERE logon_state='Logged On' and LOGON_DT >= curdate();" aDatabase`
echo $sqlcount
Your error was that the output of your mysql command was 23, which sh was trying to execute as a command, which it couldn't.