Dexter Filmore wrote:

Well, shouldn't \ do th job as well?
Thing is, even if I pass the filename foo\ bar echo tells me the name is foo bar

No, because $foo and "$foo" inside scripts behave very differently in the presence of spaces in what the variable holds.

My recommendation is that you are probably using the wrong tool. If something is getting too convoluted to handle in bash, you need to switch up a level to something like perl or python where you don't get so many "quasi" interactions. There are simply going to be far too many interactions between the shell that calls your script (could be csh, zsh, ksh, etc.) and the shell that execute your script (bash) to ever get the quoting completely sorted.

In your situation, I'd probably use Perl in spite of my being a Python person.

-a


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

Reply via email to