Help with files and spaces with shell script

Paul Smith phhs80 at gmail.com
Sun Sep 16 18:45:55 UTC 2007


On 9/16/07, Paul Ward <pnward at googlemail.com> wrote:
> I have found that using the read command also works with spaces and
> can take the output of find and convert it to a variable. The only
> issue I have found is mencoder will not convert a file with a space. I
> may have to convert teh spaces to _ for this script to work
> consistently.
>
> find /myth/recordings/ -maxdepth 1 -name \*.mpg -ctime -1 ! -mmin -1
> -print | while read i

Enclose the names of the files with quotes. That has worked fine for me.

Paul




More information about the users mailing list