@zince_general_collection · Post #9442 · 19.04.2026 г., 10:42
しろい: #illustration 260417 https://twitter.com/shiloroshi/status/2045253467577434506
Hashtags
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
Пребарај: #illustration
@zince_general_collection · Post #9442 · 19.04.2026 г., 10:42
しろい: #illustration 260417 https://twitter.com/shiloroshi/status/2045253467577434506
Hashtags
@besteanimebilder · Post #6334 · 04.04.2020 г., 17:01
ひこうき雲 #illustration 4096x1690
Hashtags
@besteanimebilder · Post #6271 · 26.02.2020 г., 20:11
shiro #illustration 10025x5457
Hashtags
@lovehopecollector · Post #1996 · 15.11.2023 г., 09:36
#Illustration Giacomo Bagnara
Hashtags
@lovehopecollector · Post #1784 · 08.10.2023 г., 19:33
#Illustration Form play Animation Studio Love the simplicity and creativity. Source
Hashtags
@lovehopecollector · Post #1632 · 18.09.2023 г., 08:00
#Illustration 余华潦草小狗 Eleven11dream source
Hashtags
@lovehopecollector · Post #1301 · 27.07.2023 г., 17:00
#Illustration Poster for documentary of Sinead O'Connor - Nothing Compares Akiko Stehrenberger “This and many iterations of it, made it to multiple rounds before it was finally unused in the end. However, I'm always happy when I get to step away from the computer. Painted with sumi ink, I then photographed water droplets over the painting. The tears concept references two things: her iconic music video and her many struggles in life that made her such a controversial figure.” RIP🌹🌹🌹
Hashtags
@lovehopecollector · Post #1646 · 21.09.2023 г., 15:15
#Art #Illustration Alex Gamsu Jenkins 好多古怪有趣充满想象力作品… 他还画漫画…好多屎尿屁…好好笑😀 Instagram: alexgamsujenkins
Hashtags
@lovehopecollector · Post #1571 · 06.09.2023 г., 15:19
#Art #Illustration Yoyo Nasty
Hashtags
@lovehopecollector · Post #1175 · 16.07.2023 г., 23:30
#Art #Illustration Guy Billout
Hashtags
@besteanimebilder · Post #6636 · 16.02.2021 г., 10:25
nagame #original#illustration 4724x3024
Hashtags
@besteanimebilder · Post #6612 · 26.11.2020 г., 18:55
きみとつなぐ #original#illustration 1080x1920
Hashtags