Dexter Filmore wrote: > > Well, set DUM to "echo" so it won't execute the command but instead show you > what the resulting command would look like, then you'll see what I mean when > running it on a filename with spaces.
The problem is that you can't see what hte exact arguments are, or even if the shell recognises the argument as one word or two. Try using something that will indicate if the file exists or not: [EMAIL PROTECTED]:~]% cat try.sh #!/bin/sh ls -b $1 ls -b "$1" [EMAIL PROTECTED]:~]% touch hello,\ world [EMAIL PROTECTED]:~]% ./try.sh hello,\ world ls: hello,: No such file or directory ls: world: No such file or directory hello,\ world [EMAIL PROTECTED]:~]% ./try.sh "hello, world" ls: hello,: No such file or directory ls: world: No such file or directory hello,\ world As you an see, putting the variable in soft quotes prevents the shell from splitting the word on spaces. -john -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
