How to find out what is causing command not found in script
I have a very small script which queries a mySQL table and puts the result into a variable. Actually that is what I want to do.
When I just run the mysql command on the command line it works fine.
Put into the script and run the script the script returns the result plus has at the end the command not found as well.
see below... 23 is the actual result from the query but what is causing the command not found at the end?
./myscript.sh: line 4: 23: command not found
How can I figure out what is causing that.
Below my code
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`
Assigning a value to a variable is as follows:
|All times are GMT -5. The time now is 09:17 AM.|