B"H
On 1/25/07, Andrew Lentvorski <[EMAIL PROTECTED]> wrote:
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"
Use either the quotation marks or the backslashes, not both, i.e.:
$ bash test.sh "foo bar" "foo baz"
OR
$ bash test.sh foo\ bar foo\ baz
Menachem
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list