bc: decimal separator comma vs. point

Mq_

I like using bc in interactive mode as a calculator. However, it only accepts the period (.) as decimal separator but I am using the a German keyboard layout, so I only have the comma (,) available on the numpad. This is quite inconvenient when using bc single handed on the numpad, because I have to move my hand and search for the period key when entering decimal fractions.

So I am looking for a simple way to use bc on the numpad only.

Some possibilities I see right now:

  • Changing keyboard layout to English for bc
  • Replacing comma with period during input
  • Changing the decimal separator in bc

I would be grateful for any ideas.

user748110

this is my alias as replacement for bc:

sh -c "sed -u 's/,/./g' | bc -l"

And this shortcut under my window manager:

urxvt -e sh -c "sed -u 's/,/./g' | bc -l"

Good luck!

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Show comma instead of point as decimal separator

From Dev

Show comma instead of point as decimal separator

From Dev

Pasting decimal numbers in excel / comma and point decimal separator

From Dev

How to convert floating point decimal separator from dot to comma in Javascript

From Dev

bc removes decimal point

From Dev

Masked EditText with comma as decimal separator

From Dev

seq uses comma as decimal separator

From Dev

Decimal comma instead of decimal point

From Java

Pandas convert numbers with a comma instead of the point for the decimal separator from objects to numbers

From Dev

Format a decimal with comma as decimal separator and without thousands separator

From Dev

Jaxb conversion of number with comma as a decimal separator

From Dev

Why django uses a comma as decimal separator

From Dev

How to make InvariantCulture recognize a comma as a decimal separator?

From Dev

NumericUpDown: accept both comma and dot as decimal separator

From Dev

Convert a double to 2 decimal places with comma separator

From Dev

Read txt file with comma decimal separator in MATLAB

From Dev

Parsing numbers with a comma decimal separator in JavaScript

From Dev

Only add thousand separator before decimal comma

From Dev

NumericUpDown: accept both comma and dot as decimal separator

From Dev

Convert a double to 2 decimal places with comma separator

From Dev

Read txt file with comma decimal separator in MATLAB

From Dev

Add comma separator to a numbers with 2 decimal points

From Dev

Google form regex for numbers with comma as decimal separator

From Dev

bc: set number of digits after decimal point

From Dev

How to show zero before decimal point in bc?

From Dev

Forcing decimal point instead of comma

From Dev

R: How can I read a CSV file with data.table::fread, that has a comma as decimal and point as thousand separator="."

From Dev

In R print decimal comma instead of decimal point

From Dev

Variable using decimal comma instead of decimal point

Related Related

  1. 1

    Show comma instead of point as decimal separator

  2. 2

    Show comma instead of point as decimal separator

  3. 3

    Pasting decimal numbers in excel / comma and point decimal separator

  4. 4

    How to convert floating point decimal separator from dot to comma in Javascript

  5. 5

    bc removes decimal point

  6. 6

    Masked EditText with comma as decimal separator

  7. 7

    seq uses comma as decimal separator

  8. 8

    Decimal comma instead of decimal point

  9. 9

    Pandas convert numbers with a comma instead of the point for the decimal separator from objects to numbers

  10. 10

    Format a decimal with comma as decimal separator and without thousands separator

  11. 11

    Jaxb conversion of number with comma as a decimal separator

  12. 12

    Why django uses a comma as decimal separator

  13. 13

    How to make InvariantCulture recognize a comma as a decimal separator?

  14. 14

    NumericUpDown: accept both comma and dot as decimal separator

  15. 15

    Convert a double to 2 decimal places with comma separator

  16. 16

    Read txt file with comma decimal separator in MATLAB

  17. 17

    Parsing numbers with a comma decimal separator in JavaScript

  18. 18

    Only add thousand separator before decimal comma

  19. 19

    NumericUpDown: accept both comma and dot as decimal separator

  20. 20

    Convert a double to 2 decimal places with comma separator

  21. 21

    Read txt file with comma decimal separator in MATLAB

  22. 22

    Add comma separator to a numbers with 2 decimal points

  23. 23

    Google form regex for numbers with comma as decimal separator

  24. 24

    bc: set number of digits after decimal point

  25. 25

    How to show zero before decimal point in bc?

  26. 26

    Forcing decimal point instead of comma

  27. 27

    R: How can I read a CSV file with data.table::fread, that has a comma as decimal and point as thousand separator="."

  28. 28

    In R print decimal comma instead of decimal point

  29. 29

    Variable using decimal comma instead of decimal point

HotTag

Archive