On Mon, Dec 27, 2010 at 10:51 PM, Rodolfo Alcazar Portillo
wrote:
> On Mon, 2010-12-27 at 13:31 -0500, Chris Tyler wrote:
>> On Mon, 2010-12-27 at 17:05 +0100, Rodolfo Alcazar Portillo wrote:
>> > Hello. See this:
>> >
>> > # A="echo 'hi'"
>> >
>> > # echo $($A)
>> > 'hi'
>> >
>> > # echo 'hi'
>>
On Mon, 2010-12-27 at 13:31 -0500, Chris Tyler wrote:
> On Mon, 2010-12-27 at 17:05 +0100, Rodolfo Alcazar Portillo wrote:
> > Hello. See this:
> >
> > # A="echo 'hi'"
> >
> > # echo $($A)
> > 'hi'
> >
> > # echo 'hi'
> > hi
> >
> > Does anyone understand why does the first command
> > evals t
On Mon, 2010-12-27 at 17:05 +0100, Rodolfo Alcazar Portillo wrote:
> Hello. See this:
>
> # A="echo 'hi'"
>
> # echo $($A)
> 'hi'
>
> # echo 'hi'
> hi
>
> Does anyone understand why does the first command
> evals the echo but echoes the simple quotes?
$() provides a type of quoting, so it's
On Mon, Dec 27, 2010 at 11:30 AM, Rodolfo Alcazar Portillo
wrote:
> On Mon, 2010-12-27 at 10:46 -0600, inode0 wrote:
>> On Mon, Dec 27, 2010 at 10:05 AM, Rodolfo Alcazar Portillo
>> wrote:
>> > Hello. See this:
>> >
>> > # A="echo 'hi'"
>> >
>> > # echo $($A)
>> > 'hi'
>>
>> That seems rather con
On Mon, 2010-12-27 at 10:46 -0600, inode0 wrote:
> On Mon, Dec 27, 2010 at 10:05 AM, Rodolfo Alcazar Portillo
> wrote:
> > Hello. See this:
> >
> > # A="echo 'hi'"
> >
> > # echo $($A)
> > 'hi'
>
> That seems rather convoluted. Are you sure you don't just want to
> "eval $A" anyway?
Very sure. N
On Mon, Dec 27, 2010 at 10:05 AM, Rodolfo Alcazar Portillo
wrote:
> Hello. See this:
>
> # A="echo 'hi'"
>
> # echo $($A)
> 'hi'
That seems rather convoluted. Are you sure you don't just want to
"eval $A" anyway?
I realize your example may be a simple abstraction of something more complex.
John
On Monday 27 December 2010 08:05 AM, Rodolfo Alcazar Portillo wrote:
> Hello. See this:
>
> # A="echo 'hi'"
I think this assignment makes the single quotes part of the string to be
"echo"ed. Its is equivalent to saying, echo \'hi\'.
If you don't want the single quotes echoed, don't use them insi
On Mon, 2010-12-27 at 08:13 -0800, Marvin Kosmal wrote:
> I will do the short explanation
> This expression does what I call Double expansion
> echo $($A)
> First it expandsecho HI
> Then it does the echo which yields HI
Please read the former mail, it echoes the quotes.
> In your second c
On 12/27/10, Rodolfo Alcazar Portillo wrote:
> Hello. See this:
>
> # A="echo 'hi'"
>
> # echo $($A)
> 'hi'
>
> # echo 'hi'
> hi
>
> Does anyone understand why does the first command
> evals the echo but echoes the simple quotes?
>
> Is there any dark shopt option which makes it run correctly?
>
>
Hello. See this:
# A="echo 'hi'"
# echo $($A)
'hi'
# echo 'hi'
hi
Does anyone understand why does the first command
evals the echo but echoes the simple quotes?
Is there any dark shopt option which makes it run correctly?
Thanks...
--
Rodolfo Alca
10 matches
Mail list logo