From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.lisp.guile.user Subject: Re: How to pass something on to xargs rm? Date: Tue, 27 Dec 2016 15:04:14 +0200 Message-ID: <83a8bhwmk1.fsf@gnu.org> References: <87d1gd7gji.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> <20161227120750.GA16030@jocasta.intra> <871swta6hm.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1482843888 24166 195.159.176.226 (27 Dec 2016 13:04:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Dec 2016 13:04:48 +0000 (UTC) Cc: guile-user@gnu.org To: ng0 Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Dec 27 14:04:44 2016 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cLrQp-0005WN-F6 for guile-user@m.gmane.org; Tue, 27 Dec 2016 14:04:43 +0100 Original-Received: from localhost ([::1]:54127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cLrQt-00074q-V3 for guile-user@m.gmane.org; Tue, 27 Dec 2016 08:04:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cLrQZ-00074a-Hn for guile-user@gnu.org; Tue, 27 Dec 2016 08:04:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cLrQW-0005T8-E0 for guile-user@gnu.org; Tue, 27 Dec 2016 08:04:27 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52104) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cLrQW-0005T4-At; Tue, 27 Dec 2016 08:04:24 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2551 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cLrQV-0005jn-PS; Tue, 27 Dec 2016 08:04:24 -0500 In-reply-to: <871swta6hm.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> (message from ng0 on Tue, 27 Dec 2016 12:42:13 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13065 Archived-At: > From: ng0 > Date: Tue, 27 Dec 2016 12:42:13 +0000 > Cc: guile-user@gnu.org > > I think I was a bit too verbose with my question. I meant to say: > the part behind the "|", which originates from a 1:1 conversion of > the bash based part, is ignored for obvious reasons. But what > would be a quick way (until I've learned enough on this topic > myself) to perform the deletion? > I know that the original, "notmuch search --output=files > tag:deleted | xargs -L 1 rm" works in the bash script, but for > the .scm script, everything above (fetching mail, tagging mail) > works and this part is ignored: > (system* "notmuch" "search" "--output=files" "tag:deleted" "|" "xargs" "-L" "1" "rm") 'system*' doesn't run the shell. You need either 'system' (which does), or use 'open-pipe*', 'open-input-pipe', etc.