Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

scale variable with bc

for dir in basil*; do
  # In reference region mode, M0.txt = estimated M0 value from arterial blood. 
  # Use bc to scale the resulting number so it only has 2 digits after the decimal point.
  # Critically, bc only works if you DO some math (so here I divide by 1)
  echo "${dir}, calib/M0_arterial_blood, $(echo "scale=2; $(cat ${dir}/calib/M0.txt)/1" | bc)"
done
Comment

PREVIOUS NEXT
Code Example
Shell :: include buymeacoffewe butto in github README 
Shell :: how to update all repositories in manjaro using terminal 
Shell :: GOOD BATCH LOGIN 
Shell :: delete all lock files 
Shell :: how to check my git username and password 
Shell :: find the first occurence with grep in a linux file 
Shell :: jq yq for html 
Shell :: How to remove one directory owned by a specific user on Linux 
Shell :: sed replace inline file 
Shell :: npm run watch not updating 
Shell :: Bash command to find the highest PID in your system 
Shell :: sed write changes to file 
Shell :: cisco username command 
Shell :: install OMV core packages on Debian 
Shell :: Apache Webserver does not show directory listings but 403 - Yosemite 
Shell :: push local file to remote forcefully 
Shell :: ubuntu package comfiguration 
Shell :: linux privilege s 
Shell :: Quick install Sourcegraph using Docker 
Shell :: bash temporary files 
Shell :: install ros numpy 
Shell :: alternative echo linux 
Shell :: install ChromeHeadless wsl 
Shell :: homebrew install nasm 
Shell :: Install aaPanel linux 
Shell :: sed prepend to all files 
Shell :: How to redirect docker-compose command stdout stderr from docker container to file 
Shell :: where to export wsl AppData 
Shell :: bash print characters from pattern to pattern 
Shell :: Auto-open DevTools on every new tab For cmd on Windows 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =