Re: bash quoting inconsistency
From: Dr Balwinder Singh Dheeman (bsd.sanspam_at_cto.homelinux.net)
Date: 10/25/04
- Next message: Menno Duursma: "Re: What does /usr mean anyway?"
- Previous message: Michael Heiming: "Re: Remove Preferences Shortcut in Red Hat Menu"
- In reply to: Peter T. Breuer: "Re: bash quoting inconsistency"
- Next in thread: Michael Heiming: "Re: bash quoting inconsistency"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 25 Oct 2004 21:47:36 +0530
On 10/25/04 18:59, Peter T. Breuer wrote:
> Chris F.A. Johnson <cfajohnson@gmail.com> wrote:
>
>>On 2004-10-25, Lawrence D?Oliveiro wrote:
>>
>>>There seems to be an inconsistency in bash in the interaction between
>>>"!", "\" and double quotes. On my SuSE 9.1 system
>>>(BASH_VERSION='2.05b.0(1)-release'), if I try the command
>>>
>>> echo "hi!"
>>>
>>>I get the error
>>>
>>> bash: !": event not found
>>
>> Only at the command line.
>>
>> In a script there is no expansion of the exclamation mark.
>
>
> I'd call that a bug - it's poor scanning of the string. Are you
> implying that pling expansion takes place BEFORE string scanning of any
> sort?
>
> (it may well, I don't know and I'm not looking it up ...)
>
> sh-2.03$ echo "hi!"
> sh: !": event not found
> sh-2.03$ ksh
> $ echo "hi!"
> hi!
> $
> $ csh
> nbd.it.uc3m.es% echo "hi!"
> ": Event not found.
> nbd.it.uc3m.es%
> nbd:/usr/oboe/ptb% echo "hi!"
> hi!
> nbd:/usr/oboe/ptb%
> % bash
> bash-2.03$ echo "hi!"
> bash: !": event not found
> bash-2.03$
>
>
> Looks to me that sh (bash) and csh are wrong, ksh and tcsh are right.
I have:
bash 2.05b-13 The GNU Bourne Again SHell
csh 20020413-1 Shell with C-like syntax, standard BSD shell
dash 0.4.21 The Debian Almquist Shell
pdksh 5.2.14-12 A public domain version of the Korn shell
sash 3.7-2 Stand-alone shell
tcsh 6.13.00-1 TENEX C Shell, an enhanced version of Berkel
zsh 4.2.1-5 A shell with lots of features
only bash is producing same error which the OP reported earlier, all
others giving me the desired output even on command line.
I mean both of my csh and tcsh are fine here.
-- Dr Balwinder Singh Dheeman Registered Linux User: #229709 CLLO (Chief Linux Learning Officer) Machines: #168573, 170593, 259192 Anu's Linux@HOME Distros: Knoppix, Fedora, FreeBSD More: http://anu.homelinux.net/~bsd/ Visit: http://counter.li.org/
- Next message: Menno Duursma: "Re: What does /usr mean anyway?"
- Previous message: Michael Heiming: "Re: Remove Preferences Shortcut in Red Hat Menu"
- In reply to: Peter T. Breuer: "Re: bash quoting inconsistency"
- Next in thread: Michael Heiming: "Re: bash quoting inconsistency"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|