bc—processes precision arithmetic
bc [ –c ] [ –l ] [ filename...]
bc is an interactive processor for a language that resembles C but provides unlimited precision arithmetic. It takes input from any files given, then reads the standard input.
Example A.5.
1 bc << EOF scale=3 4.5 + 5.6 / 3 EOF Output : 6.366 ----------------------------- 2 bc ibase=2 5 101 (Output) 20 10100 (Output ^D |
EXPLANATION
|
Get UNIX® Shells by Example, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.