diff --git a/tldr/bc b/tldr/bc index 91fab357..83d3662b 100644 --- a/tldr/bc +++ b/tldr/bc @@ -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: . - 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` diff --git a/tldr/dc b/tldr/dc index f8d67492..30388d4c 100644 --- a/tldr/dc +++ b/tldr/dc @@ -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: . - Start an interactive session: diff --git a/tldr/linux/filefrag b/tldr/linux/filefrag index c66752d7..ca2a0760 100644 --- a/tldr/linux/filefrag +++ b/tldr/linux/filefrag @@ -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: