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.

Does this help?

andrew-lentvorskis-computer:~ andrewl$ cat test.sh
echo dd if="$1" of="$2"
andrew-lentvorskis-computer:~ andrewl$ bash test.sh "foo\ bar" "foo\ baz"
dd if=foo\ bar of=foo\ baz
andrew-lentvorskis-computer:~ andrewl$ bash test.sh "\"foo\ bar\"" "\"foo\ 
baz\""
dd if="foo\ bar" of="foo\ baz"
andrew-lentvorskis-computer:~ andrewl$ bash test.sh "\"foo bar\"" "\"foo baz\""
dd if="foo bar" of="foo baz"

-a


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to