bug-coreutils
[Top][All Lists]
Advanced

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

Re: Bug in echo when trying to print "**********************************


From: Eric Blake
Subject: Re: Bug in echo when trying to print "******************************************************************************************"
Date: Wed, 27 Jun 2007 06:22:42 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.12) Gecko/20070509 Thunderbird/1.5.0.12 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Please keep replies on the list, so that others may benefit from the answers.

According to Robert Thompson on 6/26/2007 10:27 AM:
> That said, it seems like you aren't pasting the exact command you
> actually
> tried.  echo "*" echoes a single asterisk, "echo *" is a glob character,
> interpreted by your shell as all files in the current directory,
> passed as
> multiple arguments to echo, each of which are then echoed, giving the
> output you demonstrated.  This is not a bug in echo, but probably a
> misunderstanding on your part about shell quoting rules.
> 
>>

> Thanks. Can you suggest a reference to shell quoting rules?  --  Bob T.

You can start out with the shell itself - 'man bash' tries to do a good
job.  Or you could refer directly to POSIX,
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_02.
 But both of these options are a bit harsh if you are learning shell for
the first time.

A friendlier option is a good reference manual, such as O'Reilly's:
http://www.oreilly.com/catalog/bash3.  There is also plenty to be learned
from google.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGglaR84KuGfSFAYARAkrdAJ4lUx6Vh+IyNBG4r6Bz1Z1fT4vEdQCgxBba
6swpHWgTo+hf31m2TcVMbUw=
=YBpg
-----END PGP SIGNATURE-----




reply via email to

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