[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash: A Question
From: |
Lawrence Velázquez |
Subject: |
Re: Bash: A Question |
Date: |
Wed, 3 Jun 2020 14:38:13 -0400 |
> On Jun 3, 2020, at 7:21 AM, Greg Wooledge <wooledg@eeg.ccf.org>
> wrote:
>
> On Wed, Jun 03, 2020 at 07:49:33AM +0200, Lord Sam wrote:
>> *echo "`echo \"\`echo \\"hello\\"\`\"`"*
>>
>> and
>>
>> *echo "$(echo "$(echo "hello")")"*
>>
>> the former can be made, upon slightly adjusting the command, to
>> produce outputs that I could not find an explanation for, either
>> by trying to answer myself or by searching online.
>
> That's why you don't *use* the backtick syntax. It has been
> deprecated for decades.
>
> Just use the $( ) syntax.
Here are some more details, if you're interested:
https://mywiki.wooledge.org/BashFAQ/082
https://wiki.bash-hackers.org/syntax/expansion/cmdsubst
vq