From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29196 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Martin Post Newsgroups: gmane.text.pandoc Subject: Absolute path in for loop / output? Date: Tue, 7 Sep 2021 08:21:42 -0700 (PDT) Message-ID: <78489a20-5148-4826-ab6a-b43fa48938d4n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_7220_962882162.1631028102435" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29271"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCHYFZ6CWYNBBB4H32EQMGQEAAZUNVI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Sep 07 17:21:46 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f64.google.com ([209.85.210.64]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mNcuv-0007QP-VF for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 07 Sep 2021 17:21:45 +0200 Original-Received: by mail-ot1-f64.google.com with SMTP id i11-20020a9d53cb000000b00538e5ca17d6sf6384769oth.18 for ; Tue, 07 Sep 2021 08:21:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=U76yLZwal7EOfG0dpyB7vLY92wbutExqTtokD4tPhks=; b=qx6J3oOp/wScp5nna1B2RcZ7Wf/02kzTnQViXixHZ/gY440PorCdbZyBp6kw2ednRX B7IEfgGDrwrVkHM7Ea06E/LI9jq6Oj91JHIPBWHcqnLKQfQ41IvK4PDB7AjcKkmU6xYO YrIsmuDLID3KsmhoEfP1Ljb701GKHZFX4MYFkOCsQfqx1JfmRjKkFsEztF14k4o7BBPz SnR84KWzxgc1qCQsoyYSoH+vEun9zOfNvN4B9Gfg/osxsAYqLX55RZ5Pt3rCO7M0d9g1 B7s1JqhQ7Hh51T3rskkntKyFQhWFaaL1LOMOpAo/k03NNrwURkHu5+5ID2L6LZ8DItch 6otA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=U76yLZwal7EOfG0dpyB7vLY92wbutExqTtokD4tPhks=; b=EoI0Ch0spMVtWn4vQCGp4mW8rGMx8IHC9OTzkhZtuEAdj0N3wRtEnp5POA3StW4/iP Mo0MLFLsF6OX/ESYN4NEH51ykk4c5Takmql83qvF8R3kYir1A0FVyTTMJ+WmyJoNgtVd 7p5rIi62Mu0bnZGvDLDeZKYXlOkqbUhR8ZIPLti/sWuLOD5+YdkIY/z04JjcRwxWVnsb 6nh8klMC1cjMajT7QYDY4zlNP8xPoycR98yuxGMESaySg551aK4gCjuzWOW+fO3BFTp7 or9I9cy/IaOy9xKITLe7OAWKXD7fck+fWnI5lLSZo1eIMhGl70rVVAbHDRcf2ELfLX5r mfbA== 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:message-id:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=U76yLZwal7EOfG0dpyB7vLY92wbutExqTtokD4tPhks=; b=fALV0iXL3NSe9odPNX5ZtEfQ8oGB2WpYhmNgwxVxMoT/OIQ87SEfAN9h4sfV7Gn2D2 AIUFYHhitDQ/seIrNl1yo+8+CEB5yonwct2TuYfEl8WgigBo0Rmv0trJwYP4hptsHIOq 1oTVL153VBcP5D9fNDsIvH/PrmNJ4ijO2ENxqVMis5WM/zoVG7JALxn5B4h+ItsrjrEa KVenhao3p0soZ+fFJ3zxknNAD2mN6HOg0JQAhf6xa5Qz2x1V8SUca+20hctrB13lhOO8 qEOwdXF1C/ndCfO2jVQVy3SVVvLJ3j9e8Yk8JMWJVQQeH1ky6o21sgTYK0YXENFL3f/T Kd6g== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532rNVZHNeFaUe6HKWryhR2Jy+45IEAUScdIXMGnndU+qY5bU+8T +KXFzGp/sm05b+X9qSB/NuU= X-Google-Smtp-Source: ABdhPJxpFyfeigcHRvJcdK9sTThRq/4enIyj3mW6whRWxiLN8HPsFy12JWO8Hlhz3IECyo96PG1vZw== X-Received: by 2002:a9d:71c7:: with SMTP id z7mr15404211otj.194.1631028104684; Tue, 07 Sep 2021 08:21:44 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:1415:: with SMTP id w21ls2170747oiv.6.gmail; Tue, 07 Sep 2021 08:21:43 -0700 (PDT) X-Received: by 2002:aca:ab06:: with SMTP id u6mr2266292oie.120.1631028102910; Tue, 07 Sep 2021 08:21:42 -0700 (PDT) X-Original-Sender: MartinPostBerlin-Re5JQEeQqe8AvxtiuMwx3w@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:29196 Archived-At: ------=_Part_7220_962882162.1631028102435 Content-Type: multipart/alternative; boundary="----=_Part_7221_2012234568.1631028102435" ------=_Part_7221_2012234568.1631028102435 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I need to use Pandoc with absolute input and output paths in a shell=20 script, like so: #!/bin/bash for f in "/users/myname/desktop/test/input/"*.md; \ do \ pandoc "$f" \ --standalone \ -o "/users/myname/desktop/test/output/"${f%.md}.htm; \ done =E2=80=A6 which gives an error: /users/myname/desktop/test/output//users/myname/desktop/test/input/1.htm:= =20 openFile: does not exist (No such file or directory) (Removing the output path will render the files in the source directory, as= =20 expected.) I realise the problem is probably my limited understanding of how the shell= =20 works, not something with Pandoc. I still hope someone here can help. Thank= =20 you. --=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/78489a20-5148-4826-ab6a-b43fa48938d4n%40googlegroups.com. ------=_Part_7221_2012234568.1631028102435 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I need to use Pandoc with absolute input and output paths in a shell s= cript, like so:

#!/bin/bash

for f in "/users/myname/desktop/test/input/"*.md; \
do \
pandoc "$f" \
--standalone \
-o "/users/myname= /desktop/test/output/"${f%.md}.htm; \
done

=E2=80=A6 which gives an error:

/users/myname/d= esktop/test/output//users/myname/desktop/test/input/1.htm: openFile: does n= ot exist (No such file or directory)

(Removing the= output path will render the files in the source directory, as expected.)

I realise the problem is probably my limited unders= tanding of how the shell works, not something with Pandoc. I still hope som= eone here can help. Thank you.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/78489a20-5148-4826-ab6a-b43fa48938d4n%40googlegroups.= com.
------=_Part_7221_2012234568.1631028102435-- ------=_Part_7220_962882162.1631028102435--