Re: Broken $! behavior

2020-10-07 Thread Paul Fox
Thank you Chet - much appreciated.


On Wed, 7 Oct 2020 at 16:41, Chet Ramey  wrote:

> On 10/7/20 7:56 AM, Paul Fox wrote:
> > It seems like consecutive $! are mis-processed. This has always worked -
> > since csh days and bash 1.x. But sometime after 4.1 or 4.2, it got
> broken.
> > Heres my system info and version data
>
> Thanks for the report. The shell rejects the second history expansion
> because it takes it for a `$!' word expansion. I'll look at this after
> bash-5.1 is released.
>
> Chet
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/
>


Re: Broken $! behavior

2020-10-07 Thread Chet Ramey
On 10/7/20 7:56 AM, Paul Fox wrote:
> It seems like consecutive $! are mis-processed. This has always worked -
> since csh days and bash 1.x. But sometime after 4.1 or 4.2, it got broken.
> Heres my system info and version data

Thanks for the report. The shell rejects the second history expansion
because it takes it for a `$!' word expansion. I'll look at this after
bash-5.1 is released.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Broken $! behavior

2020-10-07 Thread Paul Fox
It seems like consecutive $! are mis-processed. This has always worked -
since csh days and bash 1.x. But sometime after 4.1 or 4.2, it got broken.
Heres my system info and version data

/home/fox/src/proc@allie: cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.5 LTS"
/home/fox/src/proc@allie: help | head
GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)
These shell commands are defined internally.  Type `help' to see this list.
Type `help name' to find out more about the function `name'.
Use `info bash' to find out more about the shell in general.
Use `man -k' or `info' to find out more about commands not in this list.

A star (*) next to a name means that the command is disabled.

 job_spec [&]history [-c] [-d offset] [n] or
hist>
 (( expression ))if COMMANDS; then COMMANDS; [ elif
C>
/home/fox/src/proc@allie: echo abc
abc
/home/fox/src/proc@allie: echo abc!$
echo abcabc
abcabc
/home/fox/src/proc@allie: echo !$!$
echo abcabc!$
abcabc!$

Something like "echo abc!$!$" works fine - but adjacent expansions
do not.

many thanks