newbie echo question - how does echo recognize, when it should output list of files or pure text?

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
so Im new to linux and I encountered this question in my test:
Make echo output all directories that start with a vowel (a,e,i,o,u,e), end with a number and have at least 3 characters. I thought this would be fairly easy, but soon I ended up confused and evetually failed the test.
My first thought was simply:
echo a,e,i,o,u,e*0..9
Then I tried to use square brackets
echo [a,e,i,o,u,e]*[0..9]
and at the end i tried something like this:
echo $(ls a,e,i,o,u,e*0..9)
which gave me the required output, but with some error directory missing messages, and Im not even sure if it wouldnt be considered cheating as Im using another function to do it.
Could anyone clarify for me, how do I do it and when do I use which brackets?
And I would also like to know, how does echo recognize when it should output list of directories instead of my exact words. Thank you.
wildcards echo
New contributor
Meio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
0
down vote
favorite
so Im new to linux and I encountered this question in my test:
Make echo output all directories that start with a vowel (a,e,i,o,u,e), end with a number and have at least 3 characters. I thought this would be fairly easy, but soon I ended up confused and evetually failed the test.
My first thought was simply:
echo a,e,i,o,u,e*0..9
Then I tried to use square brackets
echo [a,e,i,o,u,e]*[0..9]
and at the end i tried something like this:
echo $(ls a,e,i,o,u,e*0..9)
which gave me the required output, but with some error directory missing messages, and Im not even sure if it wouldnt be considered cheating as Im using another function to do it.
Could anyone clarify for me, how do I do it and when do I use which brackets?
And I would also like to know, how does echo recognize when it should output list of directories instead of my exact words. Thank you.
wildcards echo
New contributor
Meio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
so Im new to linux and I encountered this question in my test:
Make echo output all directories that start with a vowel (a,e,i,o,u,e), end with a number and have at least 3 characters. I thought this would be fairly easy, but soon I ended up confused and evetually failed the test.
My first thought was simply:
echo a,e,i,o,u,e*0..9
Then I tried to use square brackets
echo [a,e,i,o,u,e]*[0..9]
and at the end i tried something like this:
echo $(ls a,e,i,o,u,e*0..9)
which gave me the required output, but with some error directory missing messages, and Im not even sure if it wouldnt be considered cheating as Im using another function to do it.
Could anyone clarify for me, how do I do it and when do I use which brackets?
And I would also like to know, how does echo recognize when it should output list of directories instead of my exact words. Thank you.
wildcards echo
New contributor
Meio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
so Im new to linux and I encountered this question in my test:
Make echo output all directories that start with a vowel (a,e,i,o,u,e), end with a number and have at least 3 characters. I thought this would be fairly easy, but soon I ended up confused and evetually failed the test.
My first thought was simply:
echo a,e,i,o,u,e*0..9
Then I tried to use square brackets
echo [a,e,i,o,u,e]*[0..9]
and at the end i tried something like this:
echo $(ls a,e,i,o,u,e*0..9)
which gave me the required output, but with some error directory missing messages, and Im not even sure if it wouldnt be considered cheating as Im using another function to do it.
Could anyone clarify for me, how do I do it and when do I use which brackets?
And I would also like to know, how does echo recognize when it should output list of directories instead of my exact words. Thank you.
wildcards echo
wildcards echo
New contributor
Meio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Meio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Meio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 3 mins ago
Meio
1
1
New contributor
Meio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Meio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Meio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Meio is a new contributor. Be nice, and check out our Code of Conduct.
Meio is a new contributor. Be nice, and check out our Code of Conduct.
Meio is a new contributor. Be nice, and check out our Code of Conduct.
Meio is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476897%2fnewbie-echo-question-how-does-echo-recognize-when-it-should-output-list-of-fi%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password