Each line you write must have a command, usually the first word.
To get something printed, a common command is echo
.
If the pwd (present working directory) has files a
, aa
, bb
, and ccc
.
Then, this command will print all files in the directory:
$ echo *
a aa bb ccc
And this command will print all files in the pwd that have one character:
$ echo ?
a
However, if you do not provide a command, the first "word" (most of the time: up to the first white space) will be taken to be the command.
If you only supply the asterisk *
, the first word that results from the expansion of the asterisk will be used as the command to execute.
If the command a
does not exist, an error will be printed:
$ *
bash: a: command not found
If there is a command called a
, it will be called with the three arguments aa bb ccc
.
As you provide no more detail, we can only make a wild guess of which command is being executed with the name a
(it is not a default command). Also we don't know which shell are you using.
But all your examples show that the first a
is missing:
$ *
aa bb ccc ### missing first `a`.
$ *?
aa bb ccc ### missing first `a`.
$ * *
a aa aa bb bb ccc ccc ### missing first `a`.
Except for:
$ ?
a aa bb ccc
Of which is difficult to make any conclusion as we don't know what command is a
.