guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to pass something on to xargs rm?


From: Thien-Thi Nguyen
Subject: Re: How to pass something on to xargs rm?
Date: Mon, 29 May 2017 11:36:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

() ng0 <address@hidden>
() 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: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]