diff --git a/README.md b/README.md index 58f7cea..8b4b466 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ This wrapper renders `dc` more usable as a command line calculator by: - defining commonly used macros for more complex operations - saving precision, top of stack, and registers 0 to 9 ("memories") from one invocation to the next in the status file `$HOME/.wdcrc` -- saving last top of stack value in `$HOME/wdc` for further direct use +- saving last top of stack value in `/tmp/wdc-$USER` for further direct use (change file name in the source, if desired) # PREREQUISITES @@ -163,7 +163,7 @@ only at the very end. Otherwise, e.g the `rem` command would first have its # FILES - The status between invocations is stored in the file `$HOME/.wdcrc` as a list of `dc` commands. -- The last top of stack value is stored in `$HOME/wdc`. +- The last top of stack value is stored in `/tmp/wdc-$USER`. _These file names can be easily changed at the beginning of the script._ diff --git a/wrapdc.sh b/wrapdc.sh index 53d880a..8b4ec19 100755 --- a/wrapdc.sh +++ b/wrapdc.sh @@ -4,7 +4,7 @@ info="wrapper for dc // 2017-03-10 Y.Bonetti // see https://gitlab.com/yargo/wra # global status file statf=$HOME/.wdcrc # output file (last stack top) -outf=$HOME/wdc +outf=/tmp/wdc-$USER # clear state: precision 2, clear stack and reg.0..9 clstat='2k 0 0 0 0 0 0s00s10s20s30s40s50s60s70s80s9' if test ! -r $statf