Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash float operation

bc -l <<< '10/3' # Fast way
3.33333333333333333333
bc <<< 'scale=2; 10/3' #Define also how many decimals to take in scale
3.33
Comment

bash float operations

bc <<< '0.3333+0.6666' # Get sum of floats in bash.
0.99			#Same for Substraction and Multiplication
bc -l <<< '10/3' # Fast way to get division
3.33333333333333333333
bc <<< 'scale=2; 10/3' #Define also how many decimals to take in scale
3.33
Comment

PREVIOUS NEXT
Code Example
Shell :: unable to resolve dns when kubernetes is running on ubuntu 
Shell :: how to do a pull request with one commit 
Shell :: awk print until match 
Shell :: install scrcpy in ubuntu 
Shell :: How do I create a next application 
Shell :: (linux/arm) does not match the detected host platform (linux/amd64) 
Shell :: change file creation metadata 
Shell :: create a new git branch 
Shell :: check last 5 commit git on branch 
Shell :: bash date 
Shell :: getCityNameByLatitudeLongitude 
Shell :: how to turn off wiregurad 
Shell :: yum repository 
Shell :: git remove all changes 
Shell :: new ip linux 
Shell :: Remove nfs file 
Shell :: docker on linux 
Shell :: git initial commit 
Shell :: bash make folders according to a list 
Shell :: what is vi in linux 
Shell :: mongodb install issues 
Shell :: curl a zip 
Shell :: install pup command mac 
Shell :: add package in pubspec.yaml using command prompt in flutter 
Shell :: how to make apache not run automatically linux 
Shell :: copying a file from a server to a local folder 
Shell :: xargs example with curl 
Shell :: api to access gitlab varaible 
Shell :: delete ec2 from terraform 
Shell :: git create branch and checkout one command 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =