When was command line parsing first introduced to shell?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












Per a discussion in Chat, when was command line parsing (using positional parameters) first introduced to the Unix shell?



And also, was the naming of $1, $2 etc. in any way borrowed from C (for example, from the indexing into C's argv array)? Or did that too, like many other things in the shell syntax, come from Algol 68?







share|improve this question

























    up vote
    0
    down vote

    favorite












    Per a discussion in Chat, when was command line parsing (using positional parameters) first introduced to the Unix shell?



    And also, was the naming of $1, $2 etc. in any way borrowed from C (for example, from the indexing into C's argv array)? Or did that too, like many other things in the shell syntax, come from Algol 68?







    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Per a discussion in Chat, when was command line parsing (using positional parameters) first introduced to the Unix shell?



      And also, was the naming of $1, $2 etc. in any way borrowed from C (for example, from the indexing into C's argv array)? Or did that too, like many other things in the shell syntax, come from Algol 68?







      share|improve this question













      Per a discussion in Chat, when was command line parsing (using positional parameters) first introduced to the Unix shell?



      And also, was the naming of $1, $2 etc. in any way borrowed from C (for example, from the indexing into C's argv array)? Or did that too, like many other things in the shell syntax, come from Algol 68?









      share|improve this question












      share|improve this question




      share|improve this question








      edited May 16 at 17:12









      Kusalananda

      102k13199315




      102k13199315









      asked May 16 at 16:49









      Faheem Mitha

      22.1k1676131




      22.1k1676131




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          When the first shell was created in 1971.
          The man page says:




          When the shell is invoked as a command, it has additional string
          processing capabilities. Recall that the form in which the shell is
          invoked is



          sh [ name [ arg1 ... [ arg9 ] ] ]



          The name is the name of a file which will be read and interpreted. If not given, this
          subinstance of the shell will continue to read the standard input
          file. In the file, character sequences of the form "$n", where n is a
          digit 0, ..., 9, are replaced by the nth argument to the invocation of
          the shell (arg ). "$0" is replaced by name.







          share|improve this answer





















          • That rules out a C ancestry then.
            – Kusalananda
            May 16 at 18:27










          • And likely rules out an Algol 68 ancestry as well, because Bourne didn't come to Bell Labs until 1975.
            – Mark Plotnick
            May 16 at 19:19










          • You may be mistaking Bourne for Thompson, in any event. (-:
            – JdeBP
            May 17 at 1:34










          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
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f444201%2fwhen-was-command-line-parsing-first-introduced-to-shell%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote













          When the first shell was created in 1971.
          The man page says:




          When the shell is invoked as a command, it has additional string
          processing capabilities. Recall that the form in which the shell is
          invoked is



          sh [ name [ arg1 ... [ arg9 ] ] ]



          The name is the name of a file which will be read and interpreted. If not given, this
          subinstance of the shell will continue to read the standard input
          file. In the file, character sequences of the form "$n", where n is a
          digit 0, ..., 9, are replaced by the nth argument to the invocation of
          the shell (arg ). "$0" is replaced by name.







          share|improve this answer





















          • That rules out a C ancestry then.
            – Kusalananda
            May 16 at 18:27










          • And likely rules out an Algol 68 ancestry as well, because Bourne didn't come to Bell Labs until 1975.
            – Mark Plotnick
            May 16 at 19:19










          • You may be mistaking Bourne for Thompson, in any event. (-:
            – JdeBP
            May 17 at 1:34














          up vote
          2
          down vote













          When the first shell was created in 1971.
          The man page says:




          When the shell is invoked as a command, it has additional string
          processing capabilities. Recall that the form in which the shell is
          invoked is



          sh [ name [ arg1 ... [ arg9 ] ] ]



          The name is the name of a file which will be read and interpreted. If not given, this
          subinstance of the shell will continue to read the standard input
          file. In the file, character sequences of the form "$n", where n is a
          digit 0, ..., 9, are replaced by the nth argument to the invocation of
          the shell (arg ). "$0" is replaced by name.







          share|improve this answer





















          • That rules out a C ancestry then.
            – Kusalananda
            May 16 at 18:27










          • And likely rules out an Algol 68 ancestry as well, because Bourne didn't come to Bell Labs until 1975.
            – Mark Plotnick
            May 16 at 19:19










          • You may be mistaking Bourne for Thompson, in any event. (-:
            – JdeBP
            May 17 at 1:34












          up vote
          2
          down vote










          up vote
          2
          down vote









          When the first shell was created in 1971.
          The man page says:




          When the shell is invoked as a command, it has additional string
          processing capabilities. Recall that the form in which the shell is
          invoked is



          sh [ name [ arg1 ... [ arg9 ] ] ]



          The name is the name of a file which will be read and interpreted. If not given, this
          subinstance of the shell will continue to read the standard input
          file. In the file, character sequences of the form "$n", where n is a
          digit 0, ..., 9, are replaced by the nth argument to the invocation of
          the shell (arg ). "$0" is replaced by name.







          share|improve this answer













          When the first shell was created in 1971.
          The man page says:




          When the shell is invoked as a command, it has additional string
          processing capabilities. Recall that the form in which the shell is
          invoked is



          sh [ name [ arg1 ... [ arg9 ] ] ]



          The name is the name of a file which will be read and interpreted. If not given, this
          subinstance of the shell will continue to read the standard input
          file. In the file, character sequences of the form "$n", where n is a
          digit 0, ..., 9, are replaced by the nth argument to the invocation of
          the shell (arg ). "$0" is replaced by name.








          share|improve this answer













          share|improve this answer



          share|improve this answer











          answered May 16 at 18:08









          Ipor Sircer

          8,6771920




          8,6771920











          • That rules out a C ancestry then.
            – Kusalananda
            May 16 at 18:27










          • And likely rules out an Algol 68 ancestry as well, because Bourne didn't come to Bell Labs until 1975.
            – Mark Plotnick
            May 16 at 19:19










          • You may be mistaking Bourne for Thompson, in any event. (-:
            – JdeBP
            May 17 at 1:34
















          • That rules out a C ancestry then.
            – Kusalananda
            May 16 at 18:27










          • And likely rules out an Algol 68 ancestry as well, because Bourne didn't come to Bell Labs until 1975.
            – Mark Plotnick
            May 16 at 19:19










          • You may be mistaking Bourne for Thompson, in any event. (-:
            – JdeBP
            May 17 at 1:34















          That rules out a C ancestry then.
          – Kusalananda
          May 16 at 18:27




          That rules out a C ancestry then.
          – Kusalananda
          May 16 at 18:27












          And likely rules out an Algol 68 ancestry as well, because Bourne didn't come to Bell Labs until 1975.
          – Mark Plotnick
          May 16 at 19:19




          And likely rules out an Algol 68 ancestry as well, because Bourne didn't come to Bell Labs until 1975.
          – Mark Plotnick
          May 16 at 19:19












          You may be mistaking Bourne for Thompson, in any event. (-:
          – JdeBP
          May 17 at 1:34




          You may be mistaking Bourne for Thompson, in any event. (-:
          – JdeBP
          May 17 at 1:34












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f444201%2fwhen-was-command-line-parsing-first-introduced-to-shell%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?