csv as argument

Lonni J Friedman netllama
Thu Jul 19 09:51:00 PDT 2007


On 7/19/07, Jorge Almeida <jalmeida at math.ist.utl.pt> wrote:
> This is probably a stupid question, but anyway. Is there some way to
> coax bash into accepting a csv string as argument? Like this:
>         myprogram "aaa","   gg","aa,b","a""n"
>
> All this stuff should constitute a single argument. The idea is that the
> program itself would do the parsing.
> The shell removes the quotes. Enclosing the whole string in single
> quotes would do the work, but then what if the string itself has single
> quotes?
>
> Any idea? Or is this the wrong problem by all accounts?

I guess you could always just escape out the double quotes so that
they don't get stripped.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman                                    netllama at gmail.com
LlamaLand                       http://netllama.linux-sxs.org



More information about the Linux-users mailing list