The following script, with input of a character *, will print two
line on the screen. The first echo has one parameter, while the second
echo has two parameters. But, why the result is so difference?
"The decision on these matters depends on this: either it is or
it is not." -- Parmenides of Elea (c. 475 B.C.)
Since you have posted no script, there can be no decision.
--
Chris F.A. Johnson, author <http://cfaj.freeshell.org/shell/>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence
As Chris says, you haven;t provided a script.
But you should know that if you type
echo *,
then the shell will expand "*," to the list of filenames in the current
directory, and then pass these filenames to echo.
The results will vary when you change directories.
Really??? /bin/bash :
[jonesy@nix2 tmp]$ echo *,
*,
[jonesy@nix2 tmp]$ echo *
fileahXbHN filexfxuSP gconfd-jonesy jpsock.150_06.20575 kde-jonesy
ksocket-jonesy mcop-jonesy pdf.log ssh-koQFEm5411
[jonesy@nix2 tmp]$
Jonesy
--
Marvin L Jones | jonz | W3DHJ | linux
38.24N 104.55W | @ config.com | Jonesy | OS/2
* Killfiling google & XXXXbanter.com: jonz.net/ng.htm
There appears not to be any file in your current directory whose
name ends in "," (or maybe all the ones that end with "," also
begin with ".". At least with csh, tcsh or zsh, you'd have had
an error message.
--
Stéphane
>> The following script, with input of a character *, will print [...]
> But you should know that if you type
> echo *,
>
> then the shell will expand "*," [...]
Houston, we have a problem
(quoting, ortography, probably both :)
What's the above called, middle clause, parenthesis(?)
to comma or not to comma...
Ahhh!
[jonesy@nix2 ~]$ touch 'test,'
[jonesy@nix2 ~]$ echo *,
test,
[jonesy@nix2 ~]$ \rm 'test,'
[jonesy@nix2 ~]$ echo *,
*,
[jonesy@nix2 ~]$
Hopefully this isn't the _only_ thing I learn this year! :-)