From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,T_SCC_BODY_TEXT_LINE,URIBL_CSS autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4496 invoked from network); 12 May 2022 17:48:01 -0000 Received: from tb-ob0.topicbox.com (64.147.108.117) by inbox.vuxu.org with ESMTPUTF8; 12 May 2022 17:48:01 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob0.topicbox.com (Postfix) with ESMTP id D79B830C3A for ; Thu, 12 May 2022 13:47:59 -0400 (EDT) (envelope-from bounce.mM5ef5eba93c3c87f8333b2b8e.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id D28F04CF5E7B; Thu, 12 May 2022 13:47:59 -0400 (EDT) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=TzTvkRqD header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=martzirnask@gmail.com smtp.helo=mail-vs1-f47.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:from:date:message-id:to :content-type:list-help:list-id:list-post:list-subscribe :reply-to:subject:content-transfer-encoding:list-unsubscribe; s= sysmsg-1; t=1652377679; bh=s2YnfZzxTHWUELTGG0IsTzZI/dNKFDi8vBk55 Ji9IoQ=; b=DvHjM395VqyQ+2g8nY6p3Mj3YgdoSW9SQYyOYeERiPmbIfEIOr04V sO51VTkEgyxQ+Z/QzV5Ks47QARuizz37BejnA2jYQul4YeT6VjHFd1RvJOSFX3uy q7SIrvRr3284Vj1BK7GJN5fNdEkekTJ1gARVwRB1aZGjlzQmwy4Fm4= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1652377679; b=O28wjz2ijxKzTX56s+WIvnskRg5mM3ReMF3L2k/fA6X0sP/GMc f6jPb+XTk5P460+KUBU25q207qR44UsB5y2wTmB9FqImAURSnvNMvLzpl3guu8W8 fN6hJEDtnpeDma0HZ97KLZJXUjzInEYMqX74YK/p7hkBnCTPk8nsR2UHY= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=TzTvkRqD header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=martzirnask@gmail.com smtp.helo=mail-vs1-f47.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=TzTvkRqD header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.217.47 (mail-vs1-f47.google.com); spf=pass smtp.mailfrom=martzirnask@gmail.com smtp.helo=mail-vs1-f47.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=GVQUgjV8; x-me-sender=none; x-ptr=pass smtp.helo=mail-vs1-f47.google.com policy.ptr=mail-vs1-f47.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h= mime-version:from:date:message-id:to:content-type:list-help :list-id:list-post:list-subscribe:reply-to:subject :content-transfer-encoding:list-unsubscribe; s=dkim-1; bh=s2YnfZ zxTHWUELTGG0IsTzZI/dNKFDi8vBk55Ji9IoQ=; b=nU8/n7Arl8LYEuUjhNgkww ek2ogjQfI9O6T5M5dD5qnt/gVUOnNZAG0ImvnqZJK8KNN7OilTGJ9+LAcituTk4W hwmrFT3/KlIkDNRqKkXnxBZ9hJg3gLdfzXpIhE9sHANdZP7q68U2+bqj2+pIHx7m PYHIhSdbEGzVoMQH2aUsw= Received: from tb-mx1.topicbox.com (localhost.local [127.0.0.1]) by tb-mx1.topicbox.com (Postfix) with ESMTP id EB29F146E7CF for <9fans@9fans.net>; Thu, 12 May 2022 13:47:47 -0400 (EDT) (envelope-from martzirnask@gmail.com) Received: from tb-mx1.topicbox.com (localhost [127.0.0.1]) by tb-mx1.topicbox.com (Authentication Milter) with ESMTP id E1A1D4A3F78; Thu, 12 May 2022 13:47:47 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1652377667; b=vNS+8JBRvOWGknk445AoN6zTvkhxkxIYWq287FlS/kfox/CbSj cttMySTte0r8sKNXKVJoiyfAkGTuHaNlcS5oweh5GLDUoVi9O8O22bRZgbN6cp/H BfuQl/60AOVuut88YrQwMLNLOhl4/4YV4Z95xg0MT89hjqkGNFMSiuH4jFT6AuCa YpCTVHcSgKWLVyB0TEnL2P5eFncixYVLV0uEvL6JGroDWdWwh1bYs0m3LxpQBOwW S3QebIWU2YAsnwhu3eUH4eo1Mm6xUhImGnwM16vnfkbfT+xy5D8dkfLk9hGRsIeG HgiYy6e7pJDUbltOn3wmZ6ySRrAbyxFOFXDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:from:date:message-id:subject:to :content-type; s=arcseal; t=1652377667; bh=WykpU0vmPf9vCPtBYc/z6 VeC8ILcP3+uwlUrp/n987o=; b=YOteA+frBs0lHQeioTT5ElHMUVIlEFf0hLoRj bGAZaUfWETdSwMGBHrGQQIIBuey+h8rmDot0/pFhuxvqVU2EumJnIdU0ZbSQoFyy gKBGTma2f2EI+NP5KNOONmmfiCiJe3jE5i9iKRUrPVbRZBt8LgwB6UvnRB8rdbbo sUBGcjRsL813P6eyTkBoWxIhUJ75VI+W1Hu3/LvtgEHHOBJtvBesSnB72F2Fklm4 sC+dH9tM6enjC0wYO8ungYwgjaQlyp03uyeThBabeIdWqzIPyYaAPFarwWstuVfs fa/5mekStwbz3rfAhcSk5pHKm3cZOlRfuuivtLWkqOLEQHIOg== ARC-Authentication-Results: i=1; tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=TzTvkRqD header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.217.47 (mail-vs1-f47.google.com); spf=pass smtp.mailfrom=martzirnask@gmail.com smtp.helo=mail-vs1-f47.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=GVQUgjV8; x-me-sender=none; x-ptr=pass smtp.helo=mail-vs1-f47.google.com policy.ptr=mail-vs1-f47.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvfedrgeejgdduudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhfffkuf fvtgesthdtredttddtjeenucfhrhhomhepofgrrhhtucgkihhrnhgrshhkuceomhgrrhht iihirhhnrghskhesghhmrghilhdrtghomheqnecuggftrfgrthhtvghrnhepueegudelff fghedujeefvdevtdeguefhfeefteehleetjeefuddvudejveefleffnecuffhomhgrihhn pehtohhpihgtsghogidrtghomhenucfkphepvddtledrkeehrddvudejrdegjeenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvtdelrdekhedrvddujedr geejpdhhvghlohepmhgrihhlqdhvshduqdhfgeejrdhgohhoghhlvgdrtghomhdpmhgrih hlfhhrohhmpeeomhgrrhhtiihirhhnrghskhesghhmrghilhdrtghomheq X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (gmail.com ... _spf.google.com: Sender is authorized to use 'martzirnask@gmail.com' in 'mfrom' identity (mechanism 'include:_netblocks.google.com' matched)) receiver=tb-mx1.topicbox.com; identity=mailfrom; envelope-from="martzirnask@gmail.com"; helo=mail-vs1-f47.google.com; client-ip=209.85.217.47 Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx1.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Thu, 12 May 2022 13:47:47 -0400 (EDT) (envelope-from martzirnask@gmail.com) Received: by mail-vs1-f47.google.com with SMTP id t85so5988776vst.4 for <9fans@9fans.net>; Thu, 12 May 2022 10:47:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=WykpU0vmPf9vCPtBYc/z6VeC8ILcP3+uwlUrp/n987o=; b=GVQUgjV8F2r+0ZsBiH5BI3aJ3I8vpKokmWW3k6caNWBPisixo6SUVhSejgNJtJwG8K b8ywsiewG2xfQ77Sj4QHvZXQLR+kUp25q0VqG3FjPjb0CpHEg6hKN+mBIzaSPL5mJcHU m7WVuU9tGNTcilsKGL7jUAI1zpc674PEZ8LxCKezUToYYnkKnrtw1+otqnUnOhUR/puf ROBMWZq8eaz/wPSS7xSqw3g2k32rCCy7D4CHvKnrbeLlH7uxP0i+bFa6pJM8mSmVRZBI 9EfOptErcB/fQd883VheVH9eOXsJcp5c3zH76l3a40tNHPvMy+xMCwT1NtpW509cb2pC nx6Q== X-Gm-Message-State: AOAM532DzytFn+JUyDgHyxWI1efaH8klrq8rT9sBJEErGox1pPpIGzC+ Bxnv6A12yHMAfIw/HteZBLJQS5+1mYSw3srS+qMMo6Ih X-Google-Smtp-Source: ABdhPJz2jyRP5xB+l1dRiXMzdeubbW2BBfZ/+qhme0E6S4785BR7LeIUG+QjFx4pe9g9ndz08jktPBT7ycwdL7Q/zHM= X-Received: by 2002:a67:fe17:0:b0:32c:e77e:c3b4 with SMTP id l23-20020a67fe17000000b0032ce77ec3b4mr873151vsr.11.1652377666890; Thu, 12 May 2022 10:47:46 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6102:f0c:0:0:0:0 with HTTP; Thu, 12 May 2022 10:47:46 -0700 (PDT) From: Mart Zirnask Date: Thu, 12 May 2022 20:47:46 +0300 Message-ID: To: 9fans <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: a57b21f0-d21b-11ec-b269-fd58c84878cf Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UY2YwNjMyNDgzNzU1OGNlYS1NNWVmNWViYTkzYzNjODdmODMzM2Iy?= =?UTF-8?B?YjhlPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> Subject: [9fans] sam and 'here documents' on Unix [WAS: Re: Making multiple changes to dot using sam -d] Content-Transfer-Encoding: quoted-printable List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M5ef5eba93c3c87f8333b2b8e:1:nEe8A3vVNGdUp-Q3Nj0BTzrPHDFS2_mMZlmiRxZO9Jk A related question: 9front sam has the ^ command, which makes it easy to apply multiple sam commands to the dot from a script, e.g: #!/bin/rc cat << END ,x/red/ c/blue/ ,x/yellow/ c/green/ END How does one accomplish this in oldschool Unix sam -d without the ^ command, and also without using ssam? 'Here dcuments' work, because the following works fine on my shell (Busybox sh, not rc): $ sam -d file.txt << END ,x/red/ c/blue/ ,x/yellow/ c/green/ w q END However, piping dot to that script from within sam -d (using the | command) ends up with: sh: script.sh: not found ?warning: exit status not 0 ...and also an empty (deleted) sam buffer. Replacing 'cat' with other options, e.g. 'sam -d "$*"', eventually gave a "broken pipe" message. And, again, in all cases, an empty buffer. So, no ^ command, no ssam, but want to use substitutions from 'here documents' -- where am I going wrong? Many thanks, Mart On 11/05/2022, revcomninos@gmail.com wrote: > Thank you! I was erring in that I failed to repeat x. ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Tcf06324837558cea-M5ef5e= ba93c3c87f8333b2b8e Delivery options: https://9fans.topicbox.com/groups/9fans/subscription