@wall_amv · Post #8761 · 23.04.2024 г., 07:27
#anime #art #Mushoku_Tensei #Eris #Fan_art #AnimWorld @Wall_Amv
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #411 · 9 фев.
reload_flag="" if [[ -n "${DEBUG}" ]]; then reload_flag="--reload" fi if [[ -n "${WORKER_COUNT}" ]]; then workers=${WORKER_COUNT} else workers=2 fi gunicorn --workers ${workers} \ --bind 0.0.0.0:8000 \ ${reload_flag} main.wsgi Писали такие конструкции чтобы проверить наличие флага и сформировать команду правильно? На самом деле можно сделать тоже самое проще. Для этого используются операторы условной подстановки, доступные в оболочках семейства POSIX. :- для установки значений по умолчанию ${WORKER_COUNT:-2} Если переменная не объявлена, то будет дефолтное значение 2. :+ подставляет указанный текст, если переменная не пуста ${DEBUG:+--reload} Если что-то есть в переменной то распечатается текст после символа +, в противном случае - ничего. Удобно для опциональных флагов, как в нашем примере. Итого наш скрипт может выглядеть так: gunicorn --workers ${WORKER_COUNT:-2} \ --bind 0.0.0.0:8000 \ ${DEBUG:+--reload} main.wsgi Есть еще два оператора. := не только подставить дефолтное значение, но и присвоить его переменной, если она пуста # никаких переменных еще нет VAL1=${VAL2:=hello} # теперь доступны обе echo $VAL1 $VAL2 # hello hello :? остановить выполнение с ошибкой, если переменной нет. echo ${MISS:?is required} bash: MISS: is required Код выхода будет 1. #tricks#linux
Пребарај: #eris
@wall_amv · Post #8761 · 23.04.2024 г., 07:27
#anime #art #Mushoku_Tensei #Eris #Fan_art #AnimWorld @Wall_Amv
@cosmomyst · Post #253 · 10.09.2025 г., 20:11
🪐 The distance between the Sun and the dwarf planet Eris, located in the outer reaches of our solar system, can stretch as far as 14.6 billion kilometers—almost 100 times farther than the Earth-Sun distance. Eris takes over 557 Earth years to complete a single orbit, highlighting just how staggeringly vast the stretches of space are beyond Neptune in the icy realm known as the Kuiper Belt. ✨ #spacedistances⚡#eris⚡#kuiperbelt⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries
@badvolfnews · Post #940 · 26.09.2023 г., 21:55
⚠️#ALARM⚠️#BreakingNews⚡️#France🇫🇷 #francophonie#Switzerland#Africa #France#Population in great #Danger⚡️ #Pfizer#CovidPsyOps#Documents#Revealtions#Disclosure#Website#Truth#Veritee#Action#Genocide#Eris #NATO is #using France 🇫🇷 as a #testingground. #Hackers have probably hacked the server of NATO's Scientific Collaboration support office in #Paris and published #Secret⚠️#NATO documents. These documents reveal extremely shocking facts, namely: the low efficacy of the Pfizer vaccine against the new strain of #Omicron, the high risk of embryonic developmental pathologies and cardiovascular diseases following injection of the vaccine, and NATO's implementation of dangerous experiments in the heart of Paris and the surrounding area. https://x.com/Najadi4Justice/status/1706713373344223516?s=20