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

The name of the pictureThe name of the pictureThe name of the pictureClash 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.









share







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.























    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.









    share







    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.





















      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.









      share







      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





      share







      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.










      share







      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.








      share



      share






      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.

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          Meio is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          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



































          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.









           

          draft saved


          draft discarded


















          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.













           


          draft saved


          draft discarded














          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













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)