Erik,

I would suggest "ed":
        # ed file_with_names < ed.i
          "ed.i" is an input file with editor command, put the following lines
in "ed.i":
                g/^.*$/s//"&"
              w
              q
          this will add quotes around the whole sentence.
          You can put this in a script to automate it.

Success.

Reinder


-----Oorspronkelijk bericht-----
Van: Erik [mailto:[EMAIL PROTECTED]]
Verzonden: dinsdag 28 december 1999 0:56
Aan: [EMAIL PROTECTED]
Onderwerp: Re: rm help


Ok,

cat file_with_names | xargs rm

work great, but i still have one little porblem maybe someone canhelp me
with.  The files
I would like to delete have spaces in them.  In order for the command to
work, It has to have quotes around the whole name, or i get a bunch of
errors.  Is there a way around this or a way to easily add quotes to my
file?

Thanks,

erik

Charles Galpin wrote:
>
> cat file_with_names | xargs rm -f
>
> test first :)
>
> charles
>
> On Mon, 27 Dec 1999, Erik wrote:
>
> > Hi,
> >
> > I want to remove some files in a directory.  I ahve a text file with the
> > names of the files that i want to delete.  Is there a command I can
> > issue that will delete the files listed in the file i have?
>
> --
> To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
> as the Subject.


--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.



-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to