bug-bash
[Top][All Lists]
Advanced

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

Broken $! behavior


From: Paul Fox
Subject: Broken $! behavior
Date: Wed, 7 Oct 2020 12:56:08 +0100

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!$<space>!$" works fine - but adjacent expansions
do not.

many thanks


reply via email to

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