🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1279

Re: Can U pipe filenames to rm???

#1279
From: Matthew Farwell
Date: Sat, 29 Sep 1990 01:10
19 lines
1220 bytes
In article <28790001@col.hp.com> greiner@col.hp.com (Mike Greiner) writes:
>
>                    Piping filenames to the rm command???
>There may be a pretty simple solution to this, but I haven't found it.  I'm
>considering using a for-loop that parses each line as the loop counter, 
>but don't know if that's the best approach...appreciate any suggestions!

See xargs. (if you have it on your system.)

Example of how it works:

find / -name 'core' -print | xargs rm

Dylan.
-- 
Matthew J Farwell                 | Email: dylan@ibmpcug.co.uk
The IBM PC User Group, PO Box 360,|        ...!uunet!ukc!ibmpcug!dylan
Harrow HA1 4LQ England            | CONNECT - Usenet Access in the UK!!
Phone: +44 81-863-1191            | Sun? Don't they make coffee machines?
Technical Details
Message-ID: <1990Sep29.011052.28584@ibmpcug.co.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!slxsys!ibmpcug!dylan
References: <28790001@col.hp.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!slxsys!ibmpcug!dylan
From: dylan@ibmpcug.co.uk (Matthew Farwell)
Newsgroups: comp.unix.shell
Subject: Re: Can U pipe filenames to rm???
Message-ID: <1990Sep29.011052.28584@ibmpcug.co.uk>
Date: 29 Sep 90 01:10:52 GMT
References: <28790001@col.hp.com>
Reply-To: dylan@ibmpcug.CO.UK (Matthew Farwell)
Organization: The IBM PC User Group, UK.
Lines: 19