I want to run a script that takes arguments in a currency format. Example:
> ./myscript $55.50 total is $55.50 > ./myscript $3.40 total is $58.90
Now, no matter how hard I try to escape the dollar sign in the argument, I get:
> ./myscript $55.50 total is $5.50 > ./myscript $3.40 total is $5.90
So how do you handle currency amounts in shell scripts anyway? Obviously if I specify the amounts in the script I can escape them correctly: variable='$65' OR variable="\$65'
but how do you do this input read in from stdin or command line arguments?