From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 4B2801F44D for ; Sun, 14 Apr 2024 18:44:24 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=FZZM6Lia; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 609A43858410 for ; Sun, 14 Apr 2024 18:44:23 +0000 (GMT) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id CE19F3858D34 for ; Sun, 14 Apr 2024 18:44:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CE19F3858D34 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CE19F3858D34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::634 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713120246; cv=none; b=n7sHMj4s9Ow2uiKHiA13oL/xBc8nSRaQiYGX3nSaEi9AMAOm6IKdPd8Y6y9ZgXvOhCnFquJkP58jB+/J2N6DS3zvOhmQa7uioPDfICyB5f9TfXcCIMZIHsxSRNbh7txR5HX8EHVCrZAWUWjPtosXgAzXfmDa3zYqIzaJ8F3KZFI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713120246; c=relaxed/simple; bh=idAIUky8qYpsGGj6p6FGbhNkSaSN+mBxpCmNoP55nbo=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=u0+7vG9LCxN73coFWHQ25ltT0i2JFaVt1e2NKZuEdV0wmIQJ4+ZymZ3kQzv21hrr744zu+CsX47E+DcwvZcLkH+axU1jF4jVdvwihN5OYlu8q9TRXhY14nNBbhQtf22NzPJhdhb7QswAP+u8SUPDPk6LeNf1FeferKG2nDoQojA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a526a200879so28827566b.1 for ; Sun, 14 Apr 2024 11:44:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713120243; x=1713725043; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=X3mKmUHgIogGURLSvvAlu020rB59LBCVgK5kuscS3XM=; b=FZZM6LiaU4aC1+u8KA0NPxngPKyaRaFS7rqnhH9FtuL6zBcWwEGOlln5BKr+tiDnh5 ZatpQ1zewo3XBRQSFWsvfYmepG9LaN1XAG9xewj+h+dgJHdO4Uaw+D19GncZvA1U5InB BYyzsdcJjRk4YRZucn33SSnixRjHRhTz3k/2ZAKwM1dfu6/V3FU2s4vgjX/WJaxjW6hV tBsR7jfZHSshVntSbUHIvTyXSNiAqIPYTiFqvWgQfaaiUEKjv+g+siJ2tyysYK+beOoG 2ytrkxce6ESTVV1Yzu8QWjUhT/QtjRoAd/iOssFLotG+4/mDnyvSkxrfBUj+A3eyp+R1 Fu2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713120243; x=1713725043; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X3mKmUHgIogGURLSvvAlu020rB59LBCVgK5kuscS3XM=; b=diebwuWpnZQJ7Sra76DXvgPJG/lY4t8GxCd5ggbTJOhkTq0JtwHsxdKm5QHM3doZCm PcmOGxvFFfxMjAWkHXohmcMr7R1IybUpQdygqaSzHnlYXiA/aLnkNwwNUq7zn9k1B0Ap BPBhQA2Y14RMs7Dg0MzuP0cqLSM0xcUSPq8nqXxd6DVPjCWeuWvDDNFQvrBbe7pbE0Ys O15apEpmveqpAQe8rOGSldY+++sYl441JQALjwwFwIfui45ZdWqNUs02UEIcv/7Idpd1 FbrV/hDyGoWvMBbhKCmaUGhnBOdQCldlawcezioO+VfKk60wPcXUGXnLRfDJC8WgRItP JdSA== X-Forwarded-Encrypted: i=1; AJvYcCUcbp9XlREu+Fe6sD/6VFOUUa2ukQpuH7cKzGPXdZgkeYPnaaF9RiZ1SzP0G9BKPFp6O+MrYKvyro8hjk2pQNQ79FFLYSHUdrIM X-Gm-Message-State: AOJu0YwJ1WNom63+7Ad98SisyUvytx1xtW4ckFvDKp/KU/+U0JIIov69 arGoXOH2m5ovHPHDTe+uluSpO3aYvNog/DdE8Are/5AmEJvFpNFccFvLXq0CFngOFDYB/FzmKcD AW0Mr4H06i9b14BxkpDd/Fi918klAFUdi X-Google-Smtp-Source: AGHT+IE3s7YHC7oW1dAuBYE0hSeqjfqiIYjI87TIEuYQi37NxNtcAn8gSsXSV7qT65hnQcp3i37s/HVyyae4hNB606E= X-Received: by 2002:a17:906:713:b0:a51:c138:402f with SMTP id y19-20020a170906071300b00a51c138402fmr4824153ejb.39.1713120243184; Sun, 14 Apr 2024 11:44:03 -0700 (PDT) MIME-Version: 1.0 References: <9831afe6-958a-fbd3-9434-05dd0c9b602a@draigBrady.com> <317fe0e2-8cf9-d4ac-ed56-e6ebcc2baa55@cs.wisc.edu> <8c490a55-598a-adf6-67c2-eb2a6099620a@cs.wisc.edu> <88a67f36-2a56-a838-f763-f55b3073bb50@lando.namek.net> <2791ad90-a871-474d-89dd-bc6b20cdd1f2@case.edu> <32bd9e76-24bc-4206-aa8a-8bcc817228b1@case.edu> In-Reply-To: <32bd9e76-24bc-4206-aa8a-8bcc817228b1@case.edu> From: Zachary Santer Date: Sun, 14 Apr 2024 14:43:51 -0400 Message-ID: Subject: Re: Examples of concurrent coproc usage? To: chet.ramey@case.edu Cc: Carl Edquist , Martin D Kealey , bug-bash , libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org On Sat, Apr 13, 2024 at 4:10=E2=80=AFPM Chet Ramey wr= ote: > > The original intent was to allow the shell to drive a long-running proces= s > 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"