Erik,
Sorry, I missed the first of the thread.

One sure fire way to see what is going on, is to cd into
the dir that is giving you fits and do this:
/bin/ls -1a >dir.list

Then "vi dir.list" and issue the command in vi
:set list

That will show you any special characters in filenames.
ie: filenames with SPACES on the end would look something like:

filename   $

if it was named: filenameSPACESPACESPACE

If you want to continue from there, delete all of the filenames
in the dir.list file that you DO NOT want to delete, (. and ..) and then
issue the folowing commands in the vi session:

:1,$s/^/\"/g
(That will place a " (double quote) on the beginning of every line.

:1,$s/$/\"/g
(That will place a " (double quote) on the end of every line.

Then,
:1,$s/^/rm -i .\//g
(That will insert "rm -i ./" at the beginning of every line.

Be sure to :w! here to write the file ./dir.list

If all looks right, you can run the commands from inside of vi 
like so:

:! sh ./%

vi has the capability of running the file you are working on as a command.
(handy trick for testing scripts while you are writing them)

You will need to look for any other special characters in the dir.list
file while you are there and maybe "escape" them.
ie:

file[name

would need to be:
rm -i file\[name    (example only. You see what I'm after)

in the file before you execute.

For some kind of program, I'd need to see your original post.
(sorry I missed it)

Have fun,
--
Rick L. Mantooth
[EMAIL PROTECTED]
Whose cruel idea was it for the word "lisp" to have an "s" in it?

On Tue, 28 Dec 1999, Erik wrote:

=> Ok,
=> 
=> I did this at the command prompt:
=> 
=> > 
=> > cat FILENAME | while read FN
=> > do
=> >         rm "$FN";
=> > done;
=> 
=> but I get a bunch of error that look like this:
=> 
=> ': No such file or directory - <filename>
=> 
=> Why am I getting this, and what can I do to fix it?
=> 
=> Thanks,
=> 
=> erik
=> 
=> 
=> -- 
=> To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
=> as the Subject.
=> 
=> 


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

Reply via email to