| Post AuNA3Ttd1HlMTEj94C by [email protected] | |
| More posts by [email protected] | |
| Post #AuKXgzBGLzu6GLtz3w by [email protected] | |
| 0 likes, 0 repeats | |
| terminal poll: how confident do you feel using environment variables? | |
| Post #AuKXgzJ3t08seXYDDc by [email protected] | |
| 0 likes, 1 repeats | |
| @b0rk I needed an option that says [env variables] make me very, very nervous. … | |
| Post #AuKk7khTUyrycZUyGm by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk Confidence level:Using: 100%Trusting not to contain malicious input: 0%Tr… | |
| Post #AuM4kwRBzAmoYio568 by [email protected] | |
| 0 likes, 0 repeats | |
| this environment variables poll really is not a trap, I feel like environment v… | |
| Post #AuM4kwZhTXakz6msMK by [email protected] | |
| 0 likes, 0 repeats | |
| i learned a cursed fact about environment variables which is 1. internally env … | |
| Post #AuM4kwhV0XpXNIR6W0 by [email protected] | |
| 0 likes, 1 repeats | |
| @b0rk Is that a Unix/Linux thing or does it apply on Mac and Windows as well? | |
| Post #AuMNiFd64WnGLHo0uG by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk My first thought was as a boolean value, if the variable is set at all, t… | |
| Post #AuMNiIFSKsfKSplfyS by [email protected] | |
| 0 likes, 0 repeats | |
| @nuintari Without the equals sign it's neither set nor unset. It's some… | |
| Post #AuMNiILpx9lmmcklv6 by [email protected] | |
| 0 likes, 0 repeats | |
| @pburka pretty much what I meant. I read the description and immediately though… | |
| Post #AuMVwQpW1eJWlbt4FM by [email protected] | |
| 0 likes, 0 repeats | |
| my feeling from all of these replies is that environment variables (in the cont… | |
| Post #AuMVwQy1W17TBzrrVY by [email protected] | |
| 0 likes, 1 repeats | |
| @b0rk I would add that Env Vars are a whole different ballgame with containers … | |
| Post #AuNA35dVDabTEGzvbE by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk In relation to export, there is the difference between sourcing a shell s… | |
| Post #AuNA35jWrBQLWxojzc by [email protected] | |
| 0 likes, 0 repeats | |
| @ancoghlan @b0rk Yes! "Oh, you can't make a shell script that sets env… | |
| Post #AuNA3Ttd1HlMTEj94C by [email protected] | |
| 0 likes, 0 repeats | |
| @mattdm @ancoghlan @b0rk It's definitely a thing which makes sense once you… | |
| Post #AuNA3U1QYI08rQNNDs by [email protected] | |
| 0 likes, 0 repeats | |
| @natarasee @mattdm @b0rk My brain is insisting on trying to extend that analogy… | |
| Post #AuNA3U8s6bxLEVrJpI by [email protected] | |
| 0 likes, 0 repeats | |
| @ancoghlan Right, I guess I'd put sourcing as one of the shell commands whi… | |
| Post #AuNA3UEtkCmDXCg8Dg by [email protected] | |
| 0 likes, 0 repeats | |
| @natarasee I meant the groceries/haircut/hairdresser analogy. Although I guess … | |
| Post #AuNA3zTracAQQav1Lk by [email protected] | |
| 0 likes, 0 repeats | |
| @ancoghlan Actually extensions would probably be more the work of a stylist. | |
| Post #AuNA46VXSmfODokxQu by [email protected] | |
| 0 likes, 0 repeats | |
| @natarasee @ancoghlan Wow, this suddenly clarified so many things in my head!Th… | |
| Post #AuNA4IDXvVP8XUQl3Q by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk "login shell" vs notWhat gets passed by sudoOr set by ssh | |
| Post #AuNA4IKHWSnAsNa8YK by [email protected] | |
| 0 likes, 0 repeats | |
| @mattdm oh interesting what do you mean about environment variables and SSH? | |
| Post #AuNA4IPxBNKT9yEfOS by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk In addition to the things SSH normally sets (and/or uses), look at SendEn… | |
| Post #AuNA4TdTTRgFx5e7Um by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk If you understand the process hierarchy concept, a lot of things are obvi… | |
| Post #AuNwEgTTOGbESxtuyW by [email protected] | |
| 0 likes, 0 repeats | |
| @flexion it would mean its being asked in the context of using them in the term… | |
| Post #AuOjyNmA8fhvY43yIC by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk yeah argv and envp are pretty much the same except for how the C library … | |
| Post #AuQbBeNBES3JW5Y7QO by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk I was very confused with:/etc/environment does not do any kind of variabl… | |
| Post #AuQbBeUGo5ivs4rmTY by [email protected] | |
| 0 likes, 0 repeats | |
| @zeehio thanks! what's /etc/environment? I've never heard of that | |
| Post #AuQbBeZwT0GE9fWJJg by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk /etc/environment is a file that exists in most Linux systems. I wasn'… | |
| Post #AuQbBehO1KDQWl0Fv6 by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk if you ever want to write a zine on how the login system works on Linux a… | |
| Post #AuQbBen3gEkioLemlE by [email protected] | |
| 0 likes, 0 repeats | |
| @zeehio if I wanted to understand PAM i’d try this book https://www.tiltedwin… | |
| Post #AuQbC2cb4me2iqwlmq by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk Thanks! This is perfect! | |
| Post #AuQbCvg2Nh4pTRynHk by [email protected] | |
| 0 likes, 0 repeats | |
| @zeehio oh that makes sense, I've never understood anything about PAM | |
| Post #AuQbDA0P6lgdufcFyS by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk this is brilliant, what does `/proc/pid/environ` make of it? | |
| Post #AuQbDA78hj4gFYldTM by [email protected] | |
| 0 likes, 0 repeats | |
| @jspc it's just what you'd expect (`NAME=valuebanana`) | |
| Post #AuQbDJqUWThQQp3Tua by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk I don't know what I expected, to be honest, but I had hoped it'd … | |
| Post #AuQbDYAVGs1eqwWf32 by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk @jspc I like it that for the NUL-separated stuff in that file, the xargs … | |
| Post #AuQbDrdCuNH9DT6LvU by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk hmm, i put that i'm "extremely confident" with them but, it… | |
| Post #AuQbDrm4NQMfexFQjw by [email protected] | |
| 0 likes, 0 repeats | |
| @monorail I love "environment variables have never wronged me" | |
| Post #AuQbEiB1XtDuBPK5r6 by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk the only cursed part of environment variables imo is the lack of a namesp… | |
| Post #AuQbEiJt0wJQctTAfY by [email protected] | |
| 0 likes, 0 repeats | |
| @Lunaphied @b0rk clearing can have weird implicationsLike, PATH is pretty impor… | |
| Post #AuQbEjWgWq90MsSuG0 by [email protected] | |
| 0 likes, 0 repeats | |
| @Lunaphied @b0rk are we not gonna talk how very much thread unsafe they are and… | |
| Post #AuQbEpXGBcAZ0OmRzE by [email protected] | |
| 0 likes, 0 repeats | |
| @astraluma @b0rk huh I've never heard of LOCALE being used for filesystem e… | |
| Post #AuQbEpdzmZYbLHvpU8 by [email protected] | |
| 0 likes, 0 repeats | |
| @Lunaphied @b0rk technically it's the system encoding, which includes the f… | |
| Post #AuQbEwK2x8l83ReUrY by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk Many of the replies are tied to bash-isms, and I have one more: how to se… | |
| Post #AuQbEwQ4aja0M8TJFw by [email protected] | |
| 0 likes, 0 repeats | |
| @OmegaPolice what does -g do there? i’m still puzzled by that | |
| Post #AuQbEwXW93XCjDxFrM by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk @OmegaPolice -g is a global scoping, that means variable will be availabl… | |
| Post #AuQbEwexhNUP6JRCSm by [email protected] | |
| 0 likes, 0 repeats | |
| @pj @OmegaPolice are environment variables usually not available in functions? … | |
| Post #AuQbEwmlENjBUV5QcS by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk @OmegaPolice this depends on where exactly you set variables, if you don�… | |
| Post #AuQbEwuuk4FXtmtwKO by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk @OmegaPolice I recommend fish documentation for https://fishshell.com/doc… | |
| Post #AuQbEx2MIOCkGsNsvo by [email protected] | |
| 0 likes, 0 repeats | |
| @pj yea it feels too long for me to absorb/remember, I don't use fish's… | |
| Post #AuQbEx9Rs1sMcrhXyy by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk that’s absolutely fine, I almost never script in fish either mostly bec… | |
| Post #AuQbExGXRfXyyr1D28 by [email protected] | |
| 0 likes, 0 repeats | |
| @pj yea I think I'll just accept I'm never going to learn what -g means… | |
| Post #AuQbG7DruYC09QK5rs by [email protected] | |
| 0 likes, 0 repeats | |
| @onorio it's a Unix thing, works on Mac, no idea about Windows | |
| Post #AuQbGKsP99LGUuO9M8 by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk Thanks Julia! | |
| Post #AuQbGdjX2MXAytNpfE by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk I believe that's technically Undefined, and allowed to launch nethack… | |
| Post #AuQbGdqGdJvDJmXDA8 by [email protected] | |
| 0 likes, 0 repeats | |
| @wollman yeah when I tried it with bash it removed the invalid elements | |
| Post #AuQbHFwcy7aXUVnpLs by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk Fish makes handling environment variables much easier. But if I have to d… | |
| Post #AuQbHG3iXlG9qV7UP2 by [email protected] | |
| 0 likes, 0 repeats | |
| @tero oh interesting how do you find fish makes it easier? i love fish but I fi… | |
| Post #AuQbHGBW4lUwEgliYi by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk My most usual use case is, “I want to set an environment variable FOO t… | |
| Post #AuQbHGIbePAYag5Nbs by [email protected] | |
| 0 likes, 0 repeats | |
| @tero oh the universal variables!! that makes sense thanks | |
| Post #AuQbHuZJvgJ3U6DIDQ by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk quoting (although this is less about the variables themselves and more ab… | |
| Post #AuQbHugPVJyfq5WxGa by [email protected] | |
| 0 likes, 0 repeats | |
| @vroom do you quote variables when using the shell interactively or only when s… | |
| Post #AuQbI4jc8GTx0v6eeG by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk mostly when scripting because when I'm working interactively I _proba… | |
| Post #AuQbI8iLKvqHM8XhDs by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk @vroom I've been burned enough times that I always use quotes to make… | |
| Post #AuQbILPg7ddWk0uTR2 by [email protected] | |
| 0 likes, 0 repeats | |
| @b0rk I’m never quite sure what scope and persistence they will have | |
| Post #AuQbILWPib1Z4u3qvw by [email protected] | |
| 0 likes, 0 repeats | |
| @agawley thanks! do you mean in a shell scripting context or when using the she… |