From owner-freebsd-questions@FreeBSD.ORG Sat Nov 22 05:43:27 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD12216A4CE for ; Sat, 22 Nov 2003 05:43:27 -0800 (PST) Received: from smtp-27.ig.com.br (smtp-27.ig.com.br [200.226.132.159]) by mx1.FreeBSD.org (Postfix) with SMTP id DFEA943FF3 for ; Sat, 22 Nov 2003 05:43:25 -0800 (PST) (envelope-from hlen@ig.com.br) Received: (qmail 3266 invoked from network); 22 Nov 2003 13:43:31 -0000 Received: from unknown (HELO ig.com.br) (200.141.81.125) by smtp-27.ig.com.br with SMTP; 22 Nov 2003 13:43:31 -0000 Message-ID: <3FBF67F5.1020704@ig.com.br> Date: Sat, 22 Nov 2003 11:43:17 -0200 From: Herculano de Lima Einloft Neto User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4b) Gecko/20030525 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: hlen@ig.com.br Subject: Re: newbie: to pipe the result of a program as commandlineparameter for another. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Nov 2003 13:43:27 -0000 You can use: find [whatever] -exec rm -rf '{}' \; or find [whatever] | xargs rm -rf Usually, the answer to your question would be: use xargs or put the second command between apostrophes. Something like: vi `which mozilla` I think if you use rm -rf `find [whatever]` it might work.. DON'T use these lines unless you're absolutely sure your find will return exactly what you want.. rm -rf is the most destructive Unix command, so if you don't know what you're doing, maybe you should wait a couple of months until you do. :) Read the man pages for rm, find and xargs so you can understand this. Best, -- Herculano de Lima Einloft Neto