bug-bash
[Top][All Lists]
Advanced

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

Re: "echo [warning]" geeft "a"


From: Eric Blake
Subject: Re: "echo [warning]" geeft "a"
Date: Mon, 30 Sep 2013 15:32:26 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

On 09/30/2013 08:57 AM, invalid wrote:
> er ging iets niet goed met bashbug, dus ik doe het zo.

Apologies that I am unable to reply in your native tongue, but I think I
can explain your issue:

> Description:
> er gaat iets fout met "echo [a]", ik krijg dan "a" te zien, dus zonder de " [ 
> " en de " ] "
> 
> Repeat-By:
> echo [warning]

You are insufficiently quoting your arguments, and happen to have a file
named 'a' in the current directory.  Thus, you are experiencing shell
globbing.

$ mkdir example
$ cd example
$ echo [warning]
[warning]
$ touch a
$ echo [warning]
a
$ touch n
$ echo [warning]
a n
$ echo "[warning]"
[warning]

This is not a bug in bash, but in your script.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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