Should we call Bash Special parameters, âenvironment constantsâ?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
After reading here and then here, I came to the conclusion, that what is called in Bash "Special parameters" is quite like environment variables, but the main difference is that we shouldn't reassign Special parameters - A thing we could otherwise do without restriction (but with much caution) for environment variables.
Hence, this is my question:
Should we call Bash special parameters, "environment constants" (at least metaphorically)?
terminology
add a comment |Â
up vote
1
down vote
favorite
After reading here and then here, I came to the conclusion, that what is called in Bash "Special parameters" is quite like environment variables, but the main difference is that we shouldn't reassign Special parameters - A thing we could otherwise do without restriction (but with much caution) for environment variables.
Hence, this is my question:
Should we call Bash special parameters, "environment constants" (at least metaphorically)?
terminology
The documentation calls them special parameters. Why would anyone want to use terminology different from the reference documentation?
â AlexP
Nov 11 '17 at 10:40
I don't want that, I just used this term as an analogy to see if I understand the original term correct, but I didn't, as implied from the answer I accepted.
â Arcticooling
Nov 11 '17 at 11:04
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
After reading here and then here, I came to the conclusion, that what is called in Bash "Special parameters" is quite like environment variables, but the main difference is that we shouldn't reassign Special parameters - A thing we could otherwise do without restriction (but with much caution) for environment variables.
Hence, this is my question:
Should we call Bash special parameters, "environment constants" (at least metaphorically)?
terminology
After reading here and then here, I came to the conclusion, that what is called in Bash "Special parameters" is quite like environment variables, but the main difference is that we shouldn't reassign Special parameters - A thing we could otherwise do without restriction (but with much caution) for environment variables.
Hence, this is my question:
Should we call Bash special parameters, "environment constants" (at least metaphorically)?
terminology
edited Nov 13 '17 at 12:23
asked Nov 10 '17 at 0:54
Arcticooling
83123
83123
The documentation calls them special parameters. Why would anyone want to use terminology different from the reference documentation?
â AlexP
Nov 11 '17 at 10:40
I don't want that, I just used this term as an analogy to see if I understand the original term correct, but I didn't, as implied from the answer I accepted.
â Arcticooling
Nov 11 '17 at 11:04
add a comment |Â
The documentation calls them special parameters. Why would anyone want to use terminology different from the reference documentation?
â AlexP
Nov 11 '17 at 10:40
I don't want that, I just used this term as an analogy to see if I understand the original term correct, but I didn't, as implied from the answer I accepted.
â Arcticooling
Nov 11 '17 at 11:04
The documentation calls them special parameters. Why would anyone want to use terminology different from the reference documentation?
â AlexP
Nov 11 '17 at 10:40
The documentation calls them special parameters. Why would anyone want to use terminology different from the reference documentation?
â AlexP
Nov 11 '17 at 10:40
I don't want that, I just used this term as an analogy to see if I understand the original term correct, but I didn't, as implied from the answer I accepted.
â Arcticooling
Nov 11 '17 at 11:04
I don't want that, I just used this term as an analogy to see if I understand the original term correct, but I didn't, as implied from the answer I accepted.
â Arcticooling
Nov 11 '17 at 11:04
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
5
down vote
accepted
No. "Environment" has a specific meaning, referring to a set of variables that are passed down to child processes at which point the variables are stored in their process space. Calling other variables "environment" would be misleading and inaccurate.
add a comment |Â
up vote
1
down vote
They're not actually constants, since you can modify them with the set
command, e.g.:
user@ehost:~$ set x y z
user@ehost:~$ echo $1 $2 $3
x y z
They are parameters though, since they're passed in when the shell is invoked.
1
Thank you Igal. it helped me understand it better so I upvoted.
â Arcticooling
Nov 13 '17 at 6:32
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
No. "Environment" has a specific meaning, referring to a set of variables that are passed down to child processes at which point the variables are stored in their process space. Calling other variables "environment" would be misleading and inaccurate.
add a comment |Â
up vote
5
down vote
accepted
No. "Environment" has a specific meaning, referring to a set of variables that are passed down to child processes at which point the variables are stored in their process space. Calling other variables "environment" would be misleading and inaccurate.
add a comment |Â
up vote
5
down vote
accepted
up vote
5
down vote
accepted
No. "Environment" has a specific meaning, referring to a set of variables that are passed down to child processes at which point the variables are stored in their process space. Calling other variables "environment" would be misleading and inaccurate.
No. "Environment" has a specific meaning, referring to a set of variables that are passed down to child processes at which point the variables are stored in their process space. Calling other variables "environment" would be misleading and inaccurate.
answered Nov 10 '17 at 1:01
Ignacio Vazquez-Abrams
32.1k66780
32.1k66780
add a comment |Â
add a comment |Â
up vote
1
down vote
They're not actually constants, since you can modify them with the set
command, e.g.:
user@ehost:~$ set x y z
user@ehost:~$ echo $1 $2 $3
x y z
They are parameters though, since they're passed in when the shell is invoked.
1
Thank you Igal. it helped me understand it better so I upvoted.
â Arcticooling
Nov 13 '17 at 6:32
add a comment |Â
up vote
1
down vote
They're not actually constants, since you can modify them with the set
command, e.g.:
user@ehost:~$ set x y z
user@ehost:~$ echo $1 $2 $3
x y z
They are parameters though, since they're passed in when the shell is invoked.
1
Thank you Igal. it helped me understand it better so I upvoted.
â Arcticooling
Nov 13 '17 at 6:32
add a comment |Â
up vote
1
down vote
up vote
1
down vote
They're not actually constants, since you can modify them with the set
command, e.g.:
user@ehost:~$ set x y z
user@ehost:~$ echo $1 $2 $3
x y z
They are parameters though, since they're passed in when the shell is invoked.
They're not actually constants, since you can modify them with the set
command, e.g.:
user@ehost:~$ set x y z
user@ehost:~$ echo $1 $2 $3
x y z
They are parameters though, since they're passed in when the shell is invoked.
answered Nov 10 '17 at 1:18
igal
4,830930
4,830930
1
Thank you Igal. it helped me understand it better so I upvoted.
â Arcticooling
Nov 13 '17 at 6:32
add a comment |Â
1
Thank you Igal. it helped me understand it better so I upvoted.
â Arcticooling
Nov 13 '17 at 6:32
1
1
Thank you Igal. it helped me understand it better so I upvoted.
â Arcticooling
Nov 13 '17 at 6:32
Thank you Igal. it helped me understand it better so I upvoted.
â Arcticooling
Nov 13 '17 at 6:32
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%2f403634%2fshould-we-call-bash-special-parameters-environment-constants%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
The documentation calls them special parameters. Why would anyone want to use terminology different from the reference documentation?
â AlexP
Nov 11 '17 at 10:40
I don't want that, I just used this term as an analogy to see if I understand the original term correct, but I didn't, as implied from the answer I accepted.
â Arcticooling
Nov 11 '17 at 11:04