[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Examples of concurrent coproc usage?
From: |
Zachary Santer |
Subject: |
Re: Examples of concurrent coproc usage? |
Date: |
Sun, 14 Apr 2024 14:43:51 -0400 |
On Sat, Apr 13, 2024 at 4:10 PM Chet Ramey <chet.ramey@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"
- Re: Examples of concurrent coproc usage?, (continued)
- Re: Examples of concurrent coproc usage?, Carl Edquist, 2024/04/15
- Re: Examples of concurrent coproc usage?, Chet Ramey, 2024/04/17
- Re: Examples of concurrent coproc usage?, Carl Edquist, 2024/04/20
- Re: Examples of concurrent coproc usage?, Chet Ramey, 2024/04/22
- Re: Examples of concurrent coproc usage?, Carl Edquist, 2024/04/27
- Re: Examples of concurrent coproc usage?, Chet Ramey, 2024/04/28
- Re: Examples of concurrent coproc usage?, Robert Elz, 2024/04/13
- Re: Examples of concurrent coproc usage?, Chet Ramey, 2024/04/08
- Re: Examples of concurrent coproc usage?, Carl Edquist, 2024/04/12