@phthemes · Post #325 · 12.06.2021 г., 02:41
ㅤ TEAM 7 FROM NARUTO 🝐🝐🝐🝐🝐🝐🝐🝐🝐🝐 #dark#glassy#anime#blue ㅤ · Platforms: Android, iOS and TDesktop · Theme by@phthemes · Wallpaper by @bobohugifs ㅤ
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
Пребарај: #glassy
@phthemes · Post #325 · 12.06.2021 г., 02:41
ㅤ TEAM 7 FROM NARUTO 🝐🝐🝐🝐🝐🝐🝐🝐🝐🝐 #dark#glassy#anime#blue ㅤ · Platforms: Android, iOS and TDesktop · Theme by@phthemes · Wallpaper by @bobohugifs ㅤ
@phthemes · Post #242 · 25.04.2021 г., 03:01
ㅤㅤ ASTRONAUT 🝐🝐🝐🝐🝐🝐🝐🝐🝐🝐 #dark#aesthetic#glassy#gray ㅤ · Platforms: Android and iOS · Theme by @phthemes ㅤ
Hashtags
@phthemes · Post #249 · 26.04.2021 г., 04:30
ㅤㅤ LITTLE, LITTLE FOX 🝐🝐🝐🝐🝐🝐🝐🝐🝐🝐 #light#aesthetic#glassy#red ㅤ · Platforms: Android and iOS · Theme by @phthemes ㅤ
Hashtags
@phthemes · Post #215 · 15.04.2021 г., 03:31
ㅤㅤ REFLECTION GIRL 🝐🝐🝐🝐🝐🝐🝐🝐🝐🝐 #light#aesthetic#glassy#blue#purple ㅤ · Platforms: Android, iOS and TDesktop · Theme by @phthemes ㅤ
@phthemes · Post #328 · 13.06.2021 г., 20:27
ㅤ BLACKPINK 🝐🝐🝐🝐🝐🝐🝐🝐🝐🝐 #light#kpop#glassy#pink ㅤ · Platforms: Android, iOS and TDesktop · Theme by@phthemes ㅤ
@phthemes · Post #310 · 28.05.2021 г., 16:26
ㅤ BARBIE (Mariposa & the Fairy Princess) 🝐🝐🝐🝐🝐🝐🝐🝐🝐🝐 #dark#movie#glassy#pink#purple ㅤ · Platforms: Android, iOS and TDesktop · Theme by@phthemes · Wallpaper by @bobohugifs ㅤ
@phthemes · Post #251 · 28.04.2021 г., 04:01
ㅤ BILLIE EILISH 🝐🝐🝐🝐🝐🝐🝐🝐🝐🝐 #dark#singer#glassy#green ㅤ · Platforms: Android, iOS and TDesktop · Theme by @phthemes ㅤ
@phthemes · Post #7 · 08.08.2020 г., 19:27
ㅤ ㅤㅤ ، 𖤓 ──┈ TUTORIALS 1. How to search in the channel? Note: You can just tap on the hashtags and activate the "Search" function on the channel. Search by luminosity; #Dark#Light Search by genre; #Aesthetic#Anime#DigitalArt#Cartoon#HarryPotter#Kpop#Illustration#Movie#Realistic#Sanrio#Singer Search by subgenre; #glassy#pastel Search by color; #beige#blue#brown#gray#gold#green#multicolor#nude#pink#purple#orange#red#salmon#turquoise#yellow Note: Other words will be found by typing it directly into the search located in ⇨ ⋮ (3 dots on the upper right side) ㅤ