Bash problems

Página superior
Adjuntos:
Obtener este mensaje como un correo
+ (text/plain)
Eliminar este mensaje
Responder a este mensaje
Autor: Nathan England
Fecha:  
A: plug-discuss
Asunto: Bash problems


I am trying to make a script that copies files from one directory to another.
The problem is, some files have a space in between the names, think "My
Documents"

I need a way in bash to copy a file from one directory to another.
At the same time, I need to be able to count the files.

Currently, I'm trying something like this.

find . | tee file_list
while read file
do
cp -ruv $file $TMP/backup
done < file_list

This works great, but files such as "My Documents" can not be found by cp. It
sees it as My and Documents.

I thought there was a way to get find to report the space with a leading \ but
I can't find that and I forgot how I did it before. Can anyone help with
this?
I greatly appreciate it!

Nathan
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss