Article View: comp.unix.shell
Article #1269Can U pipe filenames to rm???
From: Mike Greiner
Date: Thu, 27 Sep 1990 19:13
Date: Thu, 27 Sep 1990 19:13
29 lines
1407 bytes
1407 bytes
Piping filenames to the rm command???
I am trying to write a script to uninstall files installed via an
ninstall package. I can generate a list of filenames to delete, but
I haven't figured out how to pipe this list of names to rm. Here's
the heart of my script so far, followed by its output:
ninstall -h $1 -vvvvv -p $2 | grep path | cut -d " " -f4
Now I want to pipe the output of this command into rm. Here's the output:
/usr/local/doc/ninstall/UserGuide.mm
/usr/local/man/man1/ninstall.1
/usr/local/man/man1m/installd.1m
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!
--Mike
#############################
# Mike Greiner #
# Information Technology #
# Hewlett-Packard #
# Colorado Springs Division #
# greiner@col.hp.com #
#############################
Technical Details
Message-ID:
<28790001@col.hp.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!sdd.hp.com!hplabs!hpcc05!col!greinerShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!sdd.hp.com!hplabs!hpcc05!col!greiner From: greiner@col.hp.com (Mike Greiner) Newsgroups: comp.unix.shell Subject: Can U pipe filenames to rm??? Message-ID: <28790001@col.hp.com> Date: 27 Sep 90 19:13:46 GMT Organization: HP Colorado Springs Division Lines: 29