Update cheatsheets

This commit is contained in:
ivuorinen
2024-07-27 00:14:38 +00:00
parent cd90ce89ca
commit 6c3d480331
3 changed files with 13 additions and 5 deletions

10
tldr/bc
View File

@@ -6,16 +6,16 @@ source: https://github.com/tldr-pages/tldr.git
# bc
> An arbitrary precision calculator language.
> See also: `dc`.
> See also: `dc`, `qalc`.
> More information: <https://manned.org/bc.1>.
- Start an interactive session:
`bc`
- Start an interactive session with the standard math library enabled:
- Start an [i]nteractive session with the standard math [l]ibrary enabled:
`bc --mathlib`
`bc --interactive --mathlib`
- Calculate an expression:
@@ -32,3 +32,7 @@ source: https://github.com/tldr-pages/tldr.git
- Calculate a sine/cosine/arctangent/natural logarithm/exponential function using `mathlib`:
`echo '{{s|c|a|l|e}}({{1}})' | bc --mathlib`
- Execute an inline factorial script:
`echo "define factorial(n) { if (n <= 1) return 1; return n*factorial(n-1); }; factorial({{10}})" | bc`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# dc
> An arbitrary precision calculator. Uses reverse polish notation (RPN).
> See also: `bc`.
> See also: `bc`, `qalc`.
> More information: <https://www.gnu.org/software/bc/manual/dc-1.05/html_mono/dc.html>.
- Start an interactive session:

View File

@@ -14,7 +14,11 @@ source: https://github.com/tldr-pages/tldr.git
- Display a report using a 1024 byte blocksize:
`filefrag -b {{path/to/file}}`
`filefrag -k {{path/to/file}}`
- Display a report using a certain blocksize:
`filefrag -b{{1024|1K|1M|1G|...}} {{path/to/file}}`
- Sync the file before requesting the mapping: