Re: execline "importas" documentation question

From: Brett Neumeier <bneumeier_at_gmail.com>
Date: Sun, 16 Sep 2018 20:35:57 -0500

On Sun, Sep 16, 2018 at 5:49 PM Colin Booth <colin_at_heliocat.net> wrote:

> I think I know what is going on. I assume you're running this on the
> commandline? If so, the shell is splitting prefix${FOO}postfix into
> three words ("prefix", "$FOO", "postfix"), then importas is deleting the
> middle one. If you write this as a full execline script like so:
> $ execlineb -c 'importas FOO FOO echo prefix${FOO}postfix'
> you'll see the full word deletion in action.
>

Ha, it was definitely a brain cloud, but it wasn't that. bash was, of
course, replacing ${FOO} with an empty string before running the importas
command.

The expected behavior does indeed show up if you single-quote that word so
that bash leaves it alone:

$ importas FOO FOO echo 'prefix${FOO}postfix'

$


-- 
Brett Neumeier (bneumeier_at_gmail.com)
Received on Mon Sep 17 2018 - 01:35:57 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC