Re: [SOLVED] Re: Bash scripting and Filenames with spaces

2002-02-19 Thread Thierry ITTY
I find it more ...funny... written like this one line for each directory to exclude, no need to edit/change their names, just note the leading \ on the last one #!/bin/sh call="find $(echo '\ /mnt/dosc/windows /mnt/dosc/Program Files /mnt/dosc/rom_zips\ ' | while read line do echo "-path

[SOLVED] Re: Bash scripting and Filenames with spaces

2002-02-19 Thread kirk
Lynne, thanks for the info...your script produces what I need, except that my arguments are not on separate lines. However, I have managed to write the following script that allows "Program\_Files" to be passed as 'Program Files' to find. Especially important was the eval ($call) (also thanks to

Re: Bash scripting and Filenames with spaces

2002-02-18 Thread Cameron Simpson
On 21:32 18 Feb 2002, Lynne Lawrence <[EMAIL PROTECTED]> wrote: | eval $call It is better, generally, to write: eval "$call" In this instance it doesn't really matter because the words in $call will be split up on the whitespace and stuck back together with spaces, and will effectively

Re: Bash scripting and Filenames with spaces

2002-02-18 Thread Lynne Lawrence
Kirk, Try something like the following - this works for me. The set -x provides a "trace" and should be removed for actual use. #!/bin/sh set -x paths_to_exclude='/tmp/dir1/Program Files /tmp/fileobJEbT-rep-tarfh /tmp/orbit* /tmp/quickenw' call=`echo "$paths_to_exclude" | ( stuff= while re

Bash scripting and Filenames with spaces

2002-02-18 Thread kirk
I am trying to get a list of /mnt/dosc excluding "Program Files" and "quickenw" from within this script. This is a stripped down version of what would normally include variables, but it illustrates the concept. Here is the script: #!/bin/sh paths_to_exclude="/mnt/dosc/Program?Files /mnt/dosc/qu