I need to get the decimal mark currently used by the system for a script to run properly according to the locale settings. French, German, Spanish... are using comma, English, Japan... point. The problem is that, while setting my locale as French for instance, I get the wrong mark using these simple code lines to get it:
# a=$(echo "scale=2;100/3"|bc)
# echo $a
33.33
#
I already tried others ways to solve the problem like getting the current locale and, while listing all locales supposed to use point, conditionally run the script with, and with comma if not listed... Of course, this doesn't match every time and I thought it should be easier to get the current mark directly.
How could I solve this? As far as I know, this problem has, at least, to be solved for all scripts using gtk hscale or vscale!
Best regards.