`env` in code - Using Environmental Variables in code - You Suck at Programming #043

`env` in code - Using Environmental Variables in code - You Suck at Programming #043

You Suck at Programming

1 месяц назад

2,300 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@MyName-tb9oz
@MyName-tb9oz - 31.01.2025 00:52

I don't think I'll ever get sick of hearing about bash shell scripting. Even if I think I could probably do the same things faster (and more securely) in C.

Ответить
@AK-vx4dy
@AK-vx4dy - 31.01.2025 01:55

Those color are added by terminal or kind of collaterall damage ?

Ответить
@MadMathMike
@MadMathMike - 31.01.2025 07:34

So... I'm definitely an idiot, but is the env command treating each of those arguments (separated by spaces after "env -") as a a statement to be executed and the standard output from each is actually put into the environment variables?

Ответить
@oof-software
@oof-software - 31.01.2025 09:06

When spawning a child process with Rust (and probably other languages too, I just only encountered this in Rust), if you set its working directory, the PWD environment variable will not point to the current directory. You gotta set that manually by passing PWD as an environment variable when spawning the child.
Intuitively I somehow just expected that the PWD variable always points to the current working directory

Ответить
@Asdayasman
@Asdayasman - 31.01.2025 11:56

This turned up in my feed. Eh. The "how" of using env is WAY less interesting than the "why". A better video would have been an example of lifting config out of source into env. Maybe your jam is <3 minute video though, I dunno.

Ответить
@DavidGardener-w1v
@DavidGardener-w1v - 31.01.2025 14:08

Honestly, I like your content, but seriously, why did you choose the most openly condescending channel name possible?

Ответить
@pythonismyvice-fo5bz
@pythonismyvice-fo5bz - 02.02.2025 00:05

config.sys

Ответить