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: Bauke Jan Douma
Subject: Re: Bug in echo when trying to print "******************************************************************************************"
Date: Wed, 27 Jun 2007 21:55:34 +0200
User-agent: Thunderbird 2.0.0.4 (X11/20070604)

Eric Blake wrote on 27-06-07 14:22:
-----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.

There's also the Advanced Bash Scripting guide, to be found at
http://tldp.org/LDP/abs/abs-guide.pdf
which has many example scripts and scriptlets, and which would
in my view not be too advanced for even a beginner (lest bad
habits creep in).

bjd





reply via email to

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