Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.databases.mysql Subject: Re: From bash script (Debian Bookworm) login and query to MariaDB Date: Sun, 5 Nov 2023 12:56:28 +0100 Lines: 37 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 2caRJVdnh5WHEZcKaX07OQlDU54y1Rkb53ZO37UQD/krOyEOz6 Cancel-Lock: sha1:qXwVPeLpbpmiJsYnONe7t7ZK7BM= sha256:23Inxy3DlsrBeAamWbdO3mTdacvENPaiPRnAJXzbyy0= User-Agent: Mozilla Thunderbird Content-Language: en-US-large In-Reply-To: Xref: csiph.com comp.databases.mysql:7681 On 05/11/2023 11:23, ^Bart wrote: >> Did you look at the mail from crontab? by default it goes to the >> localhost root user (you can change that with setting the MAILTO >> variable), if something wen t wrong while running the mysql command it >> will be in that mail (if no output, no mail). >> >> You could check your /var/log/mysql/mysql.{err,log} too >> >> I hope the "-u MY_USER" was a typo, otherwise loose the space after '-u'. > > I found this solutions: > > */5 * * * * /home/itoffice/job01.sh > > This is job01.sh > > #!/bin/bash > #sostituisce tutte le virgole presenti nel file con dei punti > sed -i -e 's/,/./gip' /home/itoffice/data_bridge/articoli.txt Yes, the root will not have the same LANG settings as your user and those you need to change the comma to full stop for decimal values. You could have added the same LANG/LC to the cron and this hadn't been a issue. > But now I need to do other things in my company so... I know it's a > dirty way to use a *.sh file but I dont't have free time to fix it maybe > next weeks... ;) Tend to become one of those things that will be never fixed and next time another ad-hoc solution is used to fix next issue. -- //Aho