In one line:
printf "%0.6f\n" $(bc -q <<< scale=6\;1/2)
More Related Contents:
- Command not found error in Bash variable assignment
- How can I use a file in a command and redirect output to the same file without truncating it?
- Why does a space in a variable assignment give an error in Bash? [duplicate]
- What is the preferred Bash shebang?
- Return value in a Bash function
- Shell equality operators (=, ==, -eq)
- What is a simple explanation for how pipes work in Bash?
- Indirect variable assignment in bash
- Shell script to delete directories older than n days
- How to recursively find the latest modified file in a directory?
- How to extract directory path from file path?
- Quick-and-dirty way to ensure only one instance of a shell script is running at a time
- What does the Bash operator
- Remove duplicate entries in a Bash script [duplicate]
- Custom Bash prompt is overwriting itself
- How to parse a CSV in a Bash script?
- How does this bash fork bomb work? [duplicate]
- Array intersection in Bash [duplicate]
- Capture both stdout and stderr in Bash [duplicate]
- Modify config file using bash script
- Command line to delete all ClearCase view-private files
- Bash read ignores leading spaces
- What’s a concise way to check that environment variables are set in a Unix shell script?
- Using a variable in brace expansion range fed to a for loop
- Source files in a bash script
- Using bash to sort data horizontally
- Best way to simulate “group by” from bash?
- Waiting for background processes to finish before exiting script
- Determine if a function exists in bash
- using bash (sed/awk) to extract rows AND columns in CSV files?