We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Linux Shell
- Bash
- Arithmetic Operations
- Discussions
Arithmetic Operations
Arithmetic Operations
Sort by
recency
|
236 Discussions
|
Please Login in order to post a comment
SOLVED
start of script
!/bin/bash
read expression result=expression" | bc -l) rounded_res=result") echo $rounded_res
read expr
result=expr" | bc -l)
printf "%.3f\n" "$result"
read input printf "%.3f\n"
echo "$input" | bc -l
this works totally fine
It will work, just a little trick
read expression
result=expression" | bc -l)
if [ result fi