On Mon, Nov 7, 2011 at 12:56 PM, Peng Yu wrote:
> Hi Clark,
>
> >> > v=" a b c ( a'b | "
> >> > a=( $v )
> >> > echo "${a[@]}"
> >
> > There's a @ char here.
>
> I see. It's my mistake.
>
> But I want to pass the 6 short arguments instead of 1 long argument to
> echo.
What do you mean by "1 lo
Hi Clark,
>> > v=" a b c ( a'b | "
>> > a=( $v )
>> > echo "${a[@]}"
>
> There's a @ char here.
I see. It's my mistake.
But I want to pass the 6 short arguments instead of 1 long argument to
echo. (echo is just an example, it can be any command that accepts
multiple arguments.)
~$ cat ./main1
(Added back the bash list)
On Mon, Nov 7, 2011 at 11:50 AM, Peng Yu wrote:
> On Sun, Nov 6, 2011 at 9:30 PM, Clark J. Wang wrote:
> > On Mon, Nov 7, 2011 at 11:02 AM, Peng Yu wrote:
> >>
> >> Hi,
> >>
> >> Suppose that I have a verbatim string " a b c ( a'b | " in bash, and
> >> I want to pas
Hi,
Suppose that I have a verbatim string " a b c ( a'b | " in bash, and
I want to pass them as 6 command line arguments. I have to the
following conversion using quoteverb.sed to pass the 6 arguments
correctly to echo, which is a little bit cumbersome. I'm wondering if
there is any better way to