From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29201 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Marc Chantreux Newsgroups: gmane.text.pandoc Subject: Re: Absolute path in for loop / output? Date: Tue, 7 Sep 2021 21:26:15 +0200 Message-ID: References: <78489a20-5148-4826-ab6a-b43fa48938d4n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15750"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBD4I5KGTVUPRBXPZ32EQMGQENPXIDHY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Sep 07 21:26:24 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ej1-f63.google.com ([209.85.218.63]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mNgjg-0003uq-7j for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 07 Sep 2021 21:26:24 +0200 Original-Received: by mail-ej1-f63.google.com with SMTP id s11-20020a170906060b00b005be824f15dasf100592ejb.2 for ; Tue, 07 Sep 2021 12:26:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1631042783; cv=pass; d=google.com; s=arc-20160816; b=wAdkOSVz7CQ7oSqv7zDXD4m8LTsuNdqtL3TpbhulY56MtemwtDr8xeTRJ/762V+f7A 837LLLuhKje+ohCcuPumgMjpnn3smNlYLcddk4/1VlpYRI0dgGaKGFfpMldA8Q4b0MqN +iZw8gZ/Js+Noe5JFe8PFNC+w0rw5mbVvwveDhO3Ni1JgkWJH7mYS62sVdv3gSAHoQXc irz2Dnl0Rb0KGiXjjmmtSSw4/GzK8tLtstC4PdpNw14qxlCziOZCW8Ib1N1Wg7p3LWhp yqcWPDPo29MFnLnpKwiuxlOASB6DsyFOPSgnh9JDDsTYh7XHhoLPPNoFm5afn51t1ewr 2CEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date:dkim-filter:sender:dkim-signature; bh=sZcqeF/fceHm4i2kMqz1lRVgFOl2xoVcxfzWn3dHb/M=; b=ZgZeMfSh6jUydvBYGmyiMTqSmE9UvAaDqjhcPoanAmmp346lGWAm64qJ40dGMBo8U7 klCVa+DduyrrmPC8r15jFZTeMv3thCHsxEDCjFu3l4admbwxaNzRAu0QKx3aMp1cGeI2 cTJDSZQH0DSDAPweOtL2O/fT3nA/Fjfu5thtWXM8FenCaJTPiJF3ZKBTD2HfQGcOoIL0 1dXNDJzIlVqAR8vnGFk8K+tI9P4AI10/iEESP34GitXLHTS0ygQsKxDZP/+2ftWlCdiw h6Hdena5TWmBXgHYNANNFK22AfKT1SCadW/Z+lFAHr5bWbcfc79PXHZZLVQCIh/PTNSV wxng== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@phear.org header.s=20180217 header.b=L6CiQ40F; spf=pass (google.com: domain of eiro-fbXiWI9j2LLYtjvyW6yDsg@public.gmane.org designates 188.42.45.194 as permitted sender) smtp.mailfrom=eiro-fbXiWI9j2LLYtjvyW6yDsg@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:dkim-filter:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=sZcqeF/fceHm4i2kMqz1lRVgFOl2xoVcxfzWn3dHb/M=; b=mbcZX/zrhygnPfC570OqGfG14DQ6b7gqB5xc/0U0U85FS3+/Zn1MVm2SV/AhX4EvB/ th0qBIgA1y/cfhynIiZ5uBRvixU/4pmjUpAq+oqEESdMpKKrMno4C0i70q8mVUQb2N2N fOdbsQqggZXLw08zeN2rK6j+rO2lRR0BVJgZjOHeIpB3OKl9ebuTi92JmgyCyutFZnuZ sBIS5wFYvTI7LUhG3HSsSTiMdwNGRPmETa4aK3tkobGNX1iyUJR7JJx6rK/0ahDiFtHI cHP1mUKY9MkR8aCchKuJIP97hQ8OFjgFLtZBnpuBkNnqEs7rFLcCB0yrPM2hA0KbbnDM uTfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:dkim-filter:date:from:to:subject :message-id:references:mime-version:content-disposition:in-reply-to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=sZcqeF/fceHm4i2kMqz1lRVgFOl2xoVcxfzWn3dHb/M=; b=AJh7dxIrC3kxjRkKCq1/YagoT/tJWAZ9sjDixzRkntsAIqaOu3zYJojLyuVaEX9yGU q+p/osUN5bzUXF+F+ELXMaqkUQAhE59npUdM3YBsTLX3P/YXDFUrMZjDRecHVq2+7vD+ duJlVcVfKjvOAtAFxavF4ljaB5Cvxfi4qsVLRlq0f9TjvINUhsZ0Nqb9EihvoENh648W /TqInUWhKPCRcTrlabRX2ddk2kU0l/XgF11+BORUOopRU1yoXrLvWKMo+z/kQujbdZAP yi3UaNNfRMBKNyyhnM1tjJvN3FqkJKJnbiUuERY4D1yXsu3+32gYyh+0Wqj97EREMemM Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM5305MlgqUoQNWRQAMf6iwFtqEpjulxidXLCmQTurx60jP0OfCnm/ c/CCqAYUoFnEyZORxHe52Sw= X-Google-Smtp-Source: ABdhPJxnFnbWADPz1SEwmQcKPd3bTy/WCSX+cY9upME5Iltw41ynYkW+rtXyTCLC0rLERCOAmJDlbA== X-Received: by 2002:a17:906:a18f:: with SMTP id s15mr20881268ejy.269.1631042783310; Tue, 07 Sep 2021 12:26:23 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a50:bb62:: with SMTP id y89ls3919821ede.2.gmail; Tue, 07 Sep 2021 12:26:20 -0700 (PDT) X-Received: by 2002:aa7:d7d5:: with SMTP id e21mr1127730eds.27.1631042780581; Tue, 07 Sep 2021 12:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631042780; cv=none; d=google.com; s=arc-20160816; b=trgOAvlf4kEhXelmxpXe5Rjj7yWN4XxYFiaPHZa7dsqwgaFnmdsMPoyB0BbqKt1O3z 9esqpt43Bg7WujUb9PZV8piJDz6OWP8xw2NtZlSC0B0WTF0kjCBqenyyC8izC1afpABc ySb/ssZYKVjIiLIj5i9wcu7KOhx862baVZ/WfoCSoiCK+29RDlgioE89Kcp1/Mi0zKAv NzCmLSFIvv/MXNUOfL7I1SwgkJ313C95qbTRe8CSkBmcQaMJbgCXrNDHCYqtFvnhBbaI EmbNjGkq0942w8Krv0NC3+ucfIEZwX7vGYB2kET+/8sM4C1/0+KR/1MIDcGGbeoPvSX0 MrGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:dkim-signature:dkim-filter; bh=zGaWtBYEen1Jk6gq17NrxcInvusrr/v9kMHNywQu6Go=; b=rURTPN5rNN7myiPVpddqsmlfPgFGGcqB6sji7Q0TdwqQvNCxPIWMfav9hWzjsw9qHm p5QG2QiAkHCKLa9twxlm3DSAzpSLmjWv2xia1VueXTjqh9khKdF3wIzRjSKneqcONXBL zW4UGf3FYC7iWAobcI1y9kLotLjTseY96P1Y9cJI1g+9eEWr3Ux3vijVaXpFtIN71tor RBRiSgLMKyP2yZcvudy2xRykV+chh65srvkv0GjNHI7TtlUhlFpoC0rLLIU+K6II8Vge QeDOkUBSYamLIFfaBPeiu9A+ykcRD8ABK0A5YCbN+6pU835MdbdOdg6A5Cyx62Vk33RJ 5+NQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@phear.org header.s=20180217 header.b=L6CiQ40F; spf=pass (google.com: domain of eiro-fbXiWI9j2LLYtjvyW6yDsg@public.gmane.org designates 188.42.45.194 as permitted sender) smtp.mailfrom=eiro-fbXiWI9j2LLYtjvyW6yDsg@public.gmane.org Original-Received: from aurora-borealis.phear.org (aurora-borealis.phear.org. [188.42.45.194]) by gmr-mx.google.com with ESMTPS id w12si791250edj.5.2021.09.07.12.26.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Sep 2021 12:26:20 -0700 (PDT) Received-SPF: pass (google.com: domain of eiro-fbXiWI9j2LLYtjvyW6yDsg@public.gmane.org designates 188.42.45.194 as permitted sender) client-ip=188.42.45.194; Original-Received: from localhost (unknown [127.0.0.1]) by aurora-borealis.phear.org (Postfix) with ESMTP id 125AA103DA for ; Tue, 7 Sep 2021 19:26:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at phear.org Original-Received: from aurora-borealis.phear.org ([127.0.0.1]) by localhost (mail.phear.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qziqKDyamLgl for ; Tue, 7 Sep 2021 19:26:18 +0000 (UTC) Original-Received: from prometheus.u-strasbg.fr (82-65-50-238.subs.proxad.net [82.65.50.238]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: khatar) by aurora-borealis.phear.org (Postfix) with ESMTPSA id 417AC103D2 for ; Tue, 7 Sep 2021 19:26:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.10.3 aurora-borealis.phear.org 417AC103D2 Content-Disposition: inline In-Reply-To: <78489a20-5148-4826-ab6a-b43fa48938d4n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: eiro-fbXiWI9j2LLYtjvyW6yDsg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@phear.org header.s=20180217 header.b=L6CiQ40F; spf=pass (google.com: domain of eiro-fbXiWI9j2LLYtjvyW6yDsg@public.gmane.org designates 188.42.45.194 as permitted sender) smtp.mailfrom=eiro-fbXiWI9j2LLYtjvyW6yDsg@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:29201 Archived-At: hello, > for f in "/users/myname/desktop/test/input/"*.md; \ > do \ > pandoc "$f" \ > --standalone \ > -o "/users/myname/desktop/test/output/"${f%.md}.htm; \ > done close :) this should do the trick: base=/users/myname/desktop/test pushd $base/input for f in *.md ; do pandoc "$f" -s -o $base/output/${f.md}.htm done popd if you use zsh and don't care about a subshell, i would have writen ( base=/users/myname/desktop/test cd $base/input for f (*.md) pandoc "$f" -s -o $base/output/$f:r.htm ) however i would like to mention make as a better solution: * a makefile to do the same job will be BASE = /users/myname/desktop/test SRCS != ls ${BASE}/input/*.md PAGES = ${SRCS:${BASE}/input/%.md=${BASE}/output/%.htm} all : ${PAGES} ${BASE}/output/%.htm: ${BASE}/input/%.md pandoc -s -o $@ $< clean:; rm -rf ${BASE}/o/* * you can just type make # build the missing pages one by one make -j4 # build the missing pages four by four make -b # rebuild every pages make clean # remove all the pages regards marc