Your message dated Sun, 28 Apr 2024 22:24:26 +0200
with message-id <[email protected]>
and subject line Re: Bug#795795: bash: Alias expansion in filename
has caused the Debian Bug report #795795,
regarding bash: Alias expansion in filename
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
795795: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795795
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: bash
Version: 4.3-13
Severity: normal
Tags: upstream

Dear Maintainer,

If you have two redirections before the command or if you don't have a
command, bash will do alias expansion on the second filename and treat
the first word as a filename and the second word as a command.  This
example shows it:

/tmp/a$ ls -a
..  ..
/tmp/a$ alias foo="abc def"
/tmp/a$ foo
bash: abc: command not found
/tmp/a$ </ >foo
bash: def: command not found
/tmp/a$ ls -a
..  ..  abc
/tmp/a$ file abc
abc: empty




-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.0.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=sv_SE.UTF-8, LC_CTYPE=sv_SE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages bash depends on:
ii  base-files   9.2
ii  dash         0.5.7-4+b1
ii  debianutils  4.5.1
ii  libc6        2.19-19
ii  libncurses5  5.9+20150516-2
ii  libtinfo5    5.9+20150516-2

Versions of packages bash recommends:
ii  bash-completion  1:2.1-4.1

Versions of packages bash suggests:
pn  bash-doc  <none>

-- no debconf information

--- End Message ---
--- Begin Message ---
Version: 5.0-6

On Sun, 16 Aug 2015 22:56:54 +0200 Robert Alm Nilsson <[email protected]> wrote:
If you have two redirections before the command or if you don't have a
command, bash will do alias expansion on the second filename and treat
the first word as a filename and the second word as a command.  This
example shows it:

/tmp/a$ ls -a
..  ..
/tmp/a$ alias foo="abc def"
/tmp/a$ foo
bash: abc: command not found
/tmp/a$ </ >foo
bash: def: command not found
/tmp/a$ ls -a
..  ..  abc
/tmp/a$ file abc
abc: empty

Hi,

this issue does not seem to affect version 5.0-6 and later of bash.

    $ cd $(mktemp -d)
    $ alias foo="abc def"
    $ foo
    bash: abc: command not found
    $ </ >foo
    $ ls -1
    foo

Please reopen this bug if you can still reproduce this issue.

Regards,

--
Gioele Barabucci

--- End Message ---

Reply via email to