bug-bash
[Top][All Lists]
Advanced

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

Re: incorrect character handling


From: Eduardo Bustamante
Subject: Re: incorrect character handling
Date: Tue, 30 Mar 2021 13:48:56 -0700

On Tue, Mar 30, 2021 at 1:38 PM by.sm--- via Bug reports for the GNU
Bourne Again SHell <bug-bash@gnu.org> wrote:
>
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: darwin18.7.0
> Compiler: clang
> Compilation CFLAGS: -DSSH_SOURCE_BASHRC
> uname output: Darwin Mac 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 
> 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
> Machine Type: x86_64-apple-darwin18.7.0
>
> Bash Version: 5.1
> Patch Level: 4
> Release Status: release
>
> Description:
>         Bash (zsh/ash/etc) has incorrect character handling, when spec 
> symbols use in another program and work with stdout. Problem with command 
> "!!", "!", "$", etc.
>
> Example: use standart output to console by python3:
> python3 -c "print('ls')"
>
> It's return ls to stdout. But if i print something like:
> python3 -c "print('wow, it\'s working !!)"
>
> bash will process "!!" like a command and substitute the previous command.

Yes, this is a feature! It's called "history substitution" and it's
enabled by default on interactive shells. You can read more about it
in the bash manual. If you don't need this behavior, you can turn it
off with: set +H



reply via email to

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