From: Thien-Thi Nguyen <ttn@gnu.org>
To: guile-user@gnu.org
Subject: Re: How to pass something on to xargs rm?
Date: Mon, 29 May 2017 11:36:24 +0200 [thread overview]
Message-ID: <87shjovwbr.fsf@zigzag> (raw)
In-Reply-To: <871swta6hm.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> (ng0's message of "Tue, 27 Dec 2016 12:42:13 +0000")
[-- Attachment #1: Type: text/plain, Size: 817 bytes --]
() ng0 <ng0@libertad.pw>
() Tue, 27 Dec 2016 12:42:13 +0000
(system* "notmuch" "search" "--output=files" "tag:deleted"
"|" "xargs" "-L" "1" "rm")
Here's what i would do (untested):
(use-modules (ice-9 popen) (ice-9 rdelim))
(let* ((port (open-input-pipe "notmuch ..."))
;; no loop necessary, we only want one
(filename (read-line port)))
(close-port port)
(delete-file filename))
Since this response is very late, i wonder if you have already
found a solution. If so, would you mind posting it?
--
Thien-Thi Nguyen -----------------------------------------------
(defun responsep (query)
(pcase (context query)
(`(technical ,ml) (correctp ml))
...)) 748E A0E8 1CB8 A748 9BFA
--------------------------------------- 6CE4 6703 2224 4C80 7502
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
prev parent reply other threads:[~2017-05-29 9:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-27 11:33 How to pass something on to xargs rm? ng0
2016-12-27 12:07 ` John Darrington
2016-12-27 12:42 ` ng0
2016-12-27 13:04 ` Eli Zaretskii
2017-05-29 9:36 ` Thien-Thi Nguyen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87shjovwbr.fsf@zigzag \
--to=ttn@gnu.org \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).