Decimal separator
blind Pete
0123peter at gmail.com
Sun Dec 29 07:44:03 UTC 2013
Johnny Rosenberg wrote:
> 2013/12/24 blind Pete <0123peter at gmail.com>
>
>> Johnny Rosenberg wrote:
>>
>> > In a terminal (bash), is there something that I can type that gives me
>> the
>> > current decimal separator?
>> >
>> > For instance, if Swedish locale:
>> >
>> > $ echo "Current decimal separator: ${SomeVariable}"
>> > Current decimal separator: ,
>> > $
>> >
>> >
>> > Johnny Rosenberg
>>
>> Current for what? You could have different separators used
>> for "ls" and "df".
>>
>
> I need to know what character will appear if I hit the decimal button on
> the numerical (built-in) keypad. In my case it's a coma, since coma is the
> Swedish decimal separator.
>
>
>
> Johnny Rosenberg
>
>
>>
>> You could grep various "locale" files or pipe the output of "env"
>> through "grep", but some variable that you want might not be defined.
>>
>> I have this;
>> psd at PPlive:~$ env | grep BLOCK
>> BLOCK_SIZE='1
>> DF_BLOCK_SIZE='M
>> psd at PPlive:~$ df .
>> Filesystem 1M-blocks Used Available Use% Mounted on
>> /dev/sda3 37,420M 30,280M 5,234M 86% /home
>> psd at PPlive:~$
>>
>> That translates as, most commands have a comma as a thousands
>> separator and units of one byte, but "df" uses units of MB.
My mistake. I thought that the "'" meant "use a comma". It
actually means "use the thousands serarator described in
LC_NUMERIC".
--
blind Pete
Sig goes here...
More information about the ubuntu-users
mailing list