GNU bash, version 5.1.8(1)
How can i please do this in a bash script, i want to multiply certain number by decimal number 1.5
Non working attempts:
result=$(( $number * 1.5 |bc -l ))
^---------------^ SC2004: $/${} is unnecessary on arithmetic variables.
^-^ SC2079: (( )) doesn't support decimals. Use bc or awk.
^-- SC2154: bc is referenced but not assigned (for output from commands, use "$(bc ...)" ).
^-- SC2154: l is referenced but not assigned.
result=$(( $number * 1,5 ))
^---------------^ SC2004: $/${} is unnecessary on arithmetic variables.
#!/bin/bash
number=3456
result=$( echo "$number*1.5"|bc )
echo "$result"
output is decimal (5184.0) which i do not want, i want whole numbers only result