Linux and Unix dc command
Short for desk calculator, dc is an arbitrary precision arithmetic package.
|filename||Input taken from file if required.|
|p||Prints current results|
|c||Clear all values on the stack|
|v||Take square root|
|i||Change input base; similar to bc ibase,|
|o||Change output base; similar to bc obase.|
|k||Set scale factor (number of digits after decimal); similar to bc scale.|
|!||Remainder of line is a Unix command.|
Enters the desk calculator, below is a short example of what can be done:
1234 - Enter base value of 1234
2 * p - Takes the value of 1234 times 2 and prints value
468 - p - Takes the value of 2468 and subtracts 468
2 / p - Takes the value of 2000 and divides by 2.
v p - Takes the value of 1000 and square roots it.
q - Quits the desk calucator