From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29198 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: Absolute path in for loop / output? Date: Tue, 7 Sep 2021 15:49:34 +0000 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" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18209"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBTUU32EQMGQEBGMXBHA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Sep 07 17:50:40 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ed1-f56.google.com ([209.85.208.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mNdMu-0004ba-Mo for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 07 Sep 2021 17:50:40 +0200 Original-Received: by mail-ed1-f56.google.com with SMTP id w18-20020aa7cb52000000b003c95870200fsf5387460edt.16 for ; Tue, 07 Sep 2021 08:50:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1631029840; cv=pass; d=google.com; s=arc-20160816; b=OWqEWLy0No6AQY1/ZInLuCouacLsdQ1hC9MDiZC3x7e+k1Uc/fNVfiCN/7LIoNwhAs E491OfNj5XbvQXZdwakDIRyb/GSA60KiMiYDmHbMlGb/qaHapShXClIQpHrFC6Oi8P7n 3BiYB3IIffzLF7UkPfNxznQ3F/mB8d7zRldv4i+AJWgcvFcG9ITQH7IRul7tx4U6prEf LOQ8KFdrekJTzZDh7ikUzRbIW5A0KF3LbgeAgx9XBczQpP0JhrP+VavaO65vCfoNiNXi 3Egn6qjBDoEcVQtCqF7yrslTUq4+Z5OMZPLtW5mL5UgwgVgnbkBB5/ThmDCJfnTlp1/U hmcw== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=Ho48Y717f04WUB91ItCrESkPDpdK+kbHLSzQBER/1l0=; b=UgIQys1SGZ5nRLWDov6Ox9WN70F/av0fwfPLcjoW9yASpq3YDeH9lz42riPZfOZzBR fqghD+o86E/YssCJvTmGZG+ljxEzN3cqnfV5fjOv63iIvFlGScfeDGR3vmm3SakpI6wU g5vyKzrBsuNegSirtD+9yW9YIHhqvu4xy9H/bkflN//pjPt95X+JrxNtgSY2/HjcFHUu GrFcBreGje312M693Z0b1zk6Q6DWo+M6MBDgr8f5anHsIzShQi621RI/aA4U5EaGZKZZ OwRG/Qt/uf5pwBMnt8fNBmYXWVaTQHkcD8ChWEBFZX59X8DdlLNwcxGvx/S8KyIXMl3I 5n4w== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=ZztRY+AV; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding: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=Ho48Y717f04WUB91ItCrESkPDpdK+kbHLSzQBER/1l0=; b=U3vCmUDena7XDinguTTRR5vKfWogxbQa9JF3tbfxlbLIB0GcWbfOkOgQ8RE40vk2C/ 1eXOCBHt6c4UQDfXQRgryIZHxSWngUExTMMG9nKGVD0f6jn7YFtaCdi07EmxCWwEisfC ePt/YCQrMWbjZ9SbU6FUBywnqz4jST+ABYlXfeuerk/VNZ+XCTlmVAjbQybSDSMBdrh9 Cuc0Q+iLaULzYQiUHGsRwjIEfH3MfOn6ENDNODRrmADUdI1QpqU7ynGN0V7G9n/JOGAS IdKhthifWETOoGfUY5nRgmPllrX68whqBMYMJaDA+Oam4/pZWUEYpX6GmjAuEuD270Ao xa8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding: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=Ho48Y717f04WUB91ItCrESkPDpdK+kbHLSzQBER/1l0=; b=nqfkFWD4Vm7qQAazSfOeC+o9+P7g6JftgEib+HJbsy6A/o1AMJBm5OwMo7OhhbcDN4 BigKQ49gAR4asBtTonQivBnn03HetV/IScq1FWG5y2ThtCOULdJEldnogO6EWoxdbMEP xg0Nvxm7Hq3ai4c25kkLPpHXwWkfpcUqmQm4m0sTP3JmZyWk8ZUGujtM7qksWYb0iojS Nj8DRPWjHWOUO92ktyd+LM4A1UN9NhZ4s0j4cGWldo10SmP1CamQCvnQYRTUVWosUz+b OFml/JfjgRRioKa5UyGIdDzXPWTGto5yx6t/0Wx+noZ8 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531s9ByvjhnsEc9yTfIOcP9VvxkYc18ziUqoGOKK+bXq6TEI3/Q8 GXIzxMNyklAlAgbdOBCpTB4= X-Google-Smtp-Source: ABdhPJxxc1ReCKZ3a6vVTBdxbaSRhhh1hgvs/ZvBb3qv58qu/AtbsrLNTLauGKXAWcACfYWK7uTOsg== X-Received: by 2002:a50:fe17:: with SMTP id f23mr119307edt.390.1631029840302; Tue, 07 Sep 2021 08:50:40 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6402:254d:: with SMTP id l13ls4294682edb.3.gmail; Tue, 07 Sep 2021 08:50:37 -0700 (PDT) X-Received: by 2002:a05:6402:5148:: with SMTP id n8mr88209edd.277.1631029837713; Tue, 07 Sep 2021 08:50:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631029837; cv=none; d=google.com; s=arc-20160816; b=lCzNJgKmB2xmr4Zl+Hf+dJZrr+V7383GlQ0lSeAAMT1McG5N2V/xxk3i0VLkZTc3Bf qfayWXPmlJhyimrgTpuwyc/wU3wGTFf7p6OWp6J56cO8uZUCR/mpDDOZMVbmjao9Bli6 0MQIn7zC2j6WkzupzNBNFAeR3CJp6xsQHorwW4bLRbtLIuFYKc+PMgprS9rOe6by+8+i ATYiwYswrrTvfwRsWSNxGCEF/4jTG0c/qWfEDOeBDOeijiK80K7oZ7aMRf/JkC1NR189 /oMQejnLQOOybAEDwrPGENwpzTGiZtgiYwmGJqe4O9UIZUVSJxrpSCLRCeQBByxXHGHz A2WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=cFIqSKHlRm9FFSbj3uwnwCKVO6q5MS1s1DnxhqKUphQ=; b=GJC+nnytEJnSEKcTaUhMgoaQNh/1uwvTdkzyx7etBM9S08C5dwvMMo7HQeP2ni99Q4 n2Fh8bRMxUInhBEys2pyIgf/+yTPRjPrBPskUJehTx89mBHY4NNkkIb/J4Ulcb81XqWF HGA2HO/zFet7KgDqvPy109jCtVNsdOIu6U4ouotejR2cTgTaxoXQPh8RCRTSf5ABMbbk 8ul9wt+trAfw7sjOIm9SMswP8aU/TI/MtSXoUoZQ55LbEsfBwPNScSV/4w8uYAJF4FbP isLiutCqNxSUD7V38TekQSKGz8JS9VYbseXwh2wWmexfxs9rJhJJIbcljNry7H3/CLl8 V3lw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=ZztRY+AV; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout02.posteo.de (mout02.posteo.de. [185.67.36.66]) by gmr-mx.google.com with ESMTPS id co13si478873edb.3.2021.09.07.08.50.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Sep 2021 08:50:37 -0700 (PDT) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) client-ip=185.67.36.66; Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 3CA08240105 for ; Tue, 7 Sep 2021 17:50:37 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4H3qVN5pBrz6tmN for ; Tue, 7 Sep 2021 17:50:36 +0200 (CEST) Content-Disposition: inline In-Reply-To: <78489a20-5148-4826-ab6a-b43fa48938d4n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=ZztRY+AV; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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:29198 Archived-At: The problem is purely related with your bash script, not with pandoc. You s= eem to have contradictory expectations about what the value of $f will be: = in `pandoc "$f", you anticipate it to be "/users/myname/desktop/test/input/= 1.md" (which is right), while in `-o "/users/myname/desktop/test/output/"${= f%.md}.htm", it is supposed to be only "1.md" (and it isn't, hence the erro= r message). A little trick: when you have error with bash scripts, it helps to run them= with `bash -xv myscript.sh` in order to see what Bash does step by step an= d what are the parameter values. Le Tuesday 07 September 2021 =C3=A0 08:21:42AM, Martin Post a =C3=A9crit : > I need to use Pandoc with absolute input and output paths in a shell scri= pt, > like so: >=20 > #!/bin/bash >=20 > for f in "/users/myname/desktop/test/input/"*.md; \ > do \ > pandoc "$f" \ > --standalone \ > -o "/users/myname/desktop/test/output/"${f%.md}.htm; \ > done >=20 > =E2=80=A6 which gives an error: >=20 > /users/myname/desktop/test/output//users/myname/desktop/test/input/1.htm: > openFile: does not exist (No such file or directory) >=20 > (Removing the output path will render the files in the source directory, = as > expected.) >=20 > I realise the problem is probably my limited understanding of how the she= ll > works, not something with Pandoc. I still hope someone here can help. Tha= nk > you. >=20 >=20 > -- > You received this message because you are subscribed to the Google Groups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an= email > to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [2]https://groups.google.com/d/m= sgid/ > pandoc-discuss/78489a20-5148-4826-ab6a-b43fa48938d4n%40googlegroups.com. >=20 > References: >=20 > [1] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [2] https://groups.google.com/d/msgid/pandoc-discuss/78489a20-5148-4826-a= b6a-b43fa48938d4n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter --=20 You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/YTeKDuaTZt9ov62V%40localhost.