How can I add a command line calculator to my bash? I have found some, but all of them use the full stop as decimal mark, but I want to have it to use the comma as decimal mark as most of the world does, see picture:(source wikipedia)blue: Full stop/Period (.)green: Comma (,)red: Momayyez ()gray: Data unavailableThe ones that I have found (all with full stop as decimal mark) are the following, where these lines have to be put into your ~/.bashrc file:Using bc, which has the advantage, that you can calculate ridiculously large numbers:calc () {  bc -l <<< $@}With awk, where you have mnemonic names for trigonometric and other functions and you can use fractional exponents and you can give the exponent by the two chars ** instead of the, on some keyboards difficult to type ^:calc () {  awk BEGIN { print $* ; }}
how to add command line calculator to bash that uses comma as decimal mark?
awk;bashrc;bc;calculator
I have found a solution.calc () {  awk '    function asin(x) { return atan2(x, sqrt(1-x*x)) }    function acos(x) { return atan2(sqrt(1-x*x), x) }    function atan(x) { return atan2(x,1) }    function tan(x) { return sin(x)/cos(x) }    BEGIN { pi=atan(1)*4; print '$(echo $@ | tr , .)} | tr . ,}This oneaccepts numbers as 5,2 or 5.2 (i.e. both full stop and comma as decimal mark)it uses comma as decimal mark for the output/solutionspaces and tabs are removed from input, i.e. you can enter easy readable calculations as inputthe number pi is defined via 4*atan(1)some common trigonometric functions are defined