Bash script and mysql
I'm trying to use a bash script to query mysql and extract a number from a table then do something with the number.
This gives me a nice clean output without the little mysql box or column name:
mysql --skip-column-names -B -s -e "use proftpd; select max(uid) from users;" --password=$MYSQLPASSWORD
The idea is to create users in a mysql authentication backend for proftp--the script above gives the highest user id --- what I would like the bash script to do is assign the next available number -- so the above script + 1
I cant get bash to accept the output of the above as a variable
If someone can help I would sure appreciate it
Last edited by flashingcurser; 07-18-2004 at 01:58 PM.