[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inconsistent handling of quotes in backticks

From: Scott Bronson
Subject: Re: Inconsistent handling of quotes in backticks
Date: Thu, 22 Jul 2004 16:56:28 -0700

I'm sorry to hear that it's not a bug.  On the other hand, your
workaround appears to do the trick.

Thanks for the prompt reply!

    - Scott

On Wed, 2004-07-21 at 15:13, Paul Jarc wrote:
> address@hidden wrote:
> > However, if you put quotes around the command in a backtick substitution,
> > the command fails:
> >
> >     $ `echo "\"echo\" hi"`
> >     bash: "echo": command not found
> This is normal behavior.  man bash:
>    Quote Removal
>        After the preceding expansions, all unquoted occurrences of the charac-
>        ters  \,  ', and " that did not result from one of the above expansions
>        are removed.
> Since these " characters were the result of command substitution, they
> are not removed.  Maybe this is what you want:
> $ eval `echo "\"echo\" hi"`
> But beware that this will also process any further expansions,
> redirections, etc., that may appear in the result of the command
> substitution.  It will be evaluated just like a top-level command.
> paul

reply via email to

[Prev in Thread] Current Thread [Next in Thread]