I\'m trying to convert whatever numbers the user inputs into 2 decimal places. For instance
What is the total cost in cents? 2345 output: 23.45
How about this:
read -p "What is the total cost? " input percent=20 echo "scale=2; $input / 100 * $percent / 100" | bc # input = 2345 , output = 4.69