rpn command line calculator @ Will’s Really Useful Engines

syntax similar to hp rpn calculators

Will’s Really Useful Engines

in order to compile on rh7, need to remove “static” from signature of several prototype defs defined inside several functions in expressions.c.

This tarball compiles under rh7

Here is a helper function for non-interactive mode, e.g. “rpn 1 1 +”, which skips the first line (name of the command) and trims leading space from the output. This might be useful for piping output of a calculation…


# sxh

function rpn {
[[ $# != 0 ]] && command rpn $@ | tail -n +2 | cut -f 2 || command rpn

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s