When was command line parsing first introduced to shell?
Clash 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?
shell command-line history
add a comment |Â
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?
shell command-line history
add a comment |Â
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?
shell command-line history
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?
shell command-line history
edited May 16 at 17:12
Kusalananda
102k13199315
102k13199315
asked May 16 at 16:49
Faheem Mitha
22.1k1676131
22.1k1676131
add a comment |Â
add a comment |Â
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
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.
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
add a comment |Â
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
add a comment |Â
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%2f444201%2fwhen-was-command-line-parsing-first-introduced-to-shell%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