From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UPjbHK7m1mE//gAAgWs5BA (envelope-from ) for ; Thu, 06 Jan 2022 13:55:10 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id mKSUFa7m1mFEkgAAG6o9tA (envelope-from ) for ; Thu, 06 Jan 2022 13:55:10 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0B5D1319EA for ; Thu, 6 Jan 2022 13:55:10 +0100 (CET) Received: from localhost ([::1]:54750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5SIP-00031D-5Y for larch@yhetil.org; Thu, 06 Jan 2022 07:55:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5SGq-0000oe-IQ for help-guix@gnu.org; Thu, 06 Jan 2022 07:53:34 -0500 Received: from [2607:f8b0:4864:20::332] (port=46715 helo=mail-ot1-x332.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n5SGp-00083w-2d for help-guix@gnu.org; Thu, 06 Jan 2022 07:53:32 -0500 Received: by mail-ot1-x332.google.com with SMTP id j97-20020a9d17ea000000b0059069215e85so2882329otj.13 for ; Thu, 06 Jan 2022 04:53:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=mdIvGeTMrwpxRXP/Owp+ffaPl/hVYVTfWKIhT2jSrA8=; b=pgqhXGRmeFzbSi6QYLXxuCcA05KNh1ysy7FkFn1Da2Y3iH1vZFiuZRtRqHM/Ge9cP+ 6HMDtC/jpoEcbir8axWn7vsFDRGycEjDmzidX1wA8ZJqPkpGeoxMC2Zz8lVrp3nM+kS7 iGYottAuakpfKoxBbWRltDKhu27hEhm6GRHf482Urc9VAVpXhi+m2oxTTSZ7N2nUhRA8 6ScqxCkUM3xuKNBRYMqsOVHJMoHXsBOnykKlE71ePaWNJKp/R0zkxnzlDmkJZcHUm9wD NdnjWUrTnjzQLRzzeFRxvfIj8ZYcQG2zezvNlhYsQFF3YzsbIwBnGsa2guEW4OpdxWkN We/Q== 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=mdIvGeTMrwpxRXP/Owp+ffaPl/hVYVTfWKIhT2jSrA8=; b=crocrurOcUOIkV5xWfpT9dHRRU6lINJwD9khgs3vGLwX2cF5+XN1yoXg5CZIwJuNFG dpN4UK6mJk8l6LAm3Wj/bVdWo3sBqVoOZxw91EKup/qa8cV+ALfrNWK1Z13ingreTklv 61RhysNSQGN8iUm3vAxGDdGo5qEUOQf17vLnUaovvrjtIineWB4IVoBkastja1I6PRlQ TNGoL4nZccPBCywETbqAPtftwKw90FtNJsyQkuTmNQgBBiXtU36+NpSHmf1Lxaxtccwz LQlL+Tj1lZc208mV+6cT2Qs/OPPu7ZhzPvNI/y+2GzIZFiFhpLo+Qa1kDbkvxkpvXTgR vFEw== X-Gm-Message-State: AOAM533PL1vas35teZ7CPgTxTj5B0Qrmk0zK2klacU1n5eIajS6BcH3z tN2k6UCUTXIgXUCEAwFMjN7FTJXf7cwvbWfrc8TtlHTOyX4= X-Google-Smtp-Source: ABdhPJy+JjMZtIwWIM0x2YMD4xgWNBEdGTbqCiQIWm4ycG4Wf5twpTt+o4wGc2BgWT4S4VU08ukzTxQ/ryJ8BoWyuS8= X-Received: by 2002:a9d:d02:: with SMTP id 2mr42829720oti.342.1641473608833; Thu, 06 Jan 2022 04:53:28 -0800 (PST) MIME-Version: 1.0 From: Mortimer Cladwell Date: Thu, 6 Jan 2022 07:53:17 -0500 Message-ID: Subject: Help needed with substitute* command To: help-guix X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::332 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::332; envelope-from=mbcladwell@gmail.com; helo=mail-ot1-x332.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641473710; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=eIzBm1OR6A6kuEsBh+eoa+YeYZJepa25LR+dwAhd4Yk=; b=QIATAdKF+HbrG16f8nnzsTfs0P+xWNmO1TlhubrGdgBEJjmq3xfIunp0xPw8omL6cRf0MG a0Vbzy5u5CasfqP9m8u6p358dedsnEi0OZZi1vtEEi+5KKXz8YI5O0E7YqJuCOpbQtSHMf 17BQ+h1oFMm4xtxhMWmK5hTT3XgFG8jXH7Frvu7CqwBunSufawTPzli6+LXlkOHnKGmgU0 dtzP2GYu2P32jXbppBiQg7r+uNFuiRXKyUmzcefbokvCjRmitze2qA+BQ/ATfwD0rIwGmE iW921lNIdVTbwg0Rfh+vgj1Y174FtT61D30nn+29aH3gSlc5fbPzF0HynvF0tw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641473710; a=rsa-sha256; cv=none; b=aHwA8Uhuc8ckHFwOB47ngn7u+bLUJ/P1NZKZ3YXPlKgd8Jrg1eb8zdrAfeoOHBQfvJ0MJ1 p2dXd3jtfYLB456B7Uj7N+iJOgFR1KTgO54FvQ+q9QBC+0CgKX517DeWIO60u64qon0gRC 5Vj0zdgoUksacYJ0FrS4Y/kaKqMPHEMxImT2IEGVJfIXAuI/MKYZRRj+lgZuKbKfLA6tI3 ab2w4UUyfkVSlFoo2y+wAzcRMxnuan2I3sPGpoQLhO4uUDLou91kjTRdv0uxBJYHrXISOp c3rU8wpQoRhJscIiWawHVsFiiPzK3sAhK8kPB0B4DMTIuDEUr5RKdpAb34bwMQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=pgqhXGRm; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.00 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=pgqhXGRm; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 0B5D1319EA X-Spam-Score: -2.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: LZD0TR3vuXBb Hi, I do not understand the second substitute* example in the Guix Manual. I have the executable mysubs.scm: --mysubs.scm--------------------------------------------------------- (add-to-load-path "/gnu/store/rjzj1z89jqcb60nhg5gknkibcl84b3jb-guix-29745d23b-modules/share/guile/site/3.0") (add-to-load-path ".") (use-modules (guix build utils) (ice-9 rdelim) (ice-9 popen) (ice-9 regex) ;;list-matches (ice-9 pretty-print)) (define (main args) (begin (substitute* "./input.txt" (("hello") "good morning\n") (("foo([a-z]+)bar(.*)$" all letters end) (string-append "baz" letters end)))) (pretty-print "done")) ---------end------------------------------------------------------------ I run this on 2 different inputs representing the two examples in the manual: ---input.txt(1)------ hello --------------------- result: good morning ---input.txt(2)------- foo(abc)bar(def) ------------------- result: foo(abc)bar(def) Why no substitution with the second example? Is the letters/letter in the manual a typo? If I use letter I get "...unbound variable..." Thanks Mortimer