On Sat, Apr 13, 2024 at 4:10 PM Chet Ramey <chet.ra...@case.edu> wrote: > > The original intent was to allow the shell to drive a long-running process > that ran more-or-less in parallel with it. Look at examples/scripts/bcalc > for an example of that kind of use.
$ ./bcalc equation: -12 ./bcalc: line 94: history: -1: invalid option history: usage: history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...] -12 equation: exit diff --git a/examples/scripts/bcalc b/examples/scripts/bcalc index bc7e2b40..826eca4f 100644 --- a/examples/scripts/bcalc +++ b/examples/scripts/bcalc @@ -91,7 +91,7 @@ do esac # save to the history list - history -s "$EQN" + history -s -- "$EQN" # run it through bc calc "$EQN"