Should we call Bash Special parameters, “environment constants”?

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







share|improve this question






















  • 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














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







share|improve this question






















  • 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












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







share|improve this question














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









share|improve this question













share|improve this question




share|improve this question








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
















  • 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










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.






share|improve this answer



























    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.






    share|improve this answer
















    • 1




      Thank you Igal. it helped me understand it better so I upvoted.
      – Arcticooling
      Nov 13 '17 at 6:32










    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%2f403634%2fshould-we-call-bash-special-parameters-environment-constants%23new-answer', 'question_page');

    );

    Post as a guest






























    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.






    share|improve this answer
























      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.






      share|improve this answer






















        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.






        share|improve this answer












        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 10 '17 at 1:01









        Ignacio Vazquez-Abrams

        32.1k66780




        32.1k66780






















            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.






            share|improve this answer
















            • 1




              Thank you Igal. it helped me understand it better so I upvoted.
              – Arcticooling
              Nov 13 '17 at 6:32














            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.






            share|improve this answer
















            • 1




              Thank you Igal. it helped me understand it better so I upvoted.
              – Arcticooling
              Nov 13 '17 at 6:32












            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.






            share|improve this answer












            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.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            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












            • 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

















             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            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













































































            Popular posts from this blog

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

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay