А знаете ли вы, что в Bash есть особая переменная "$_" ? Из описания можно узнать, что в переменную "$_" помещается последний аргумент последней команды.
Что-то знакомое? Конечно, в Python есть примерно тоже самое.
Мы знаем, что дата первого релиза Bash (8 июня 1989) несколько раньше чем первый релиз Python (20 февраля 1991). Если учесть, что по задумке автора Python это агрегация самых успешных практик отовсюду, можно ли сказать что именно эта фишка к нему пришла из Bash? Ни подтверждения ни опровержения я пока не нашел.
Давайте просто считать это совпадением 😉
А как это может быть полезно в Bash?
Приведу простой пример, который оценят те, кто часто работает в терминале.
Допустим, нам надо создать директорию и зайти в неё. Что обычно делаем?
:~$ mkdir foldername
:~$ cd foldername
:~/foldername$
Как это сделать в одну команду?
:~$ mkdir foldername && cd foldername
:~/foldername$
Уже лучше, но хочется короче, без повторов. Вот тут и пригодится наша переменная. Напомню, что в неё сохраняется последний аргумент предыдущей команды.
:~$ mkdir foldername && cd $_
:~/foldername$
_________________
PS.
Символы "&&"" разделяют команды и означают, что требуется выполнить вторую команду только если первая завершилась успешно.
#linux#tricks
#MANA/USDT analysis :
#MANA is currently in a correction phase. It is advisable to wait for the price to test the support zone before considering a long entry. With bullish momentum expected to continue, the price is likely to revisit previous highs.
TF : 1W
Entry : $0.4158
Target : $0.8556
SL : $0.3117
#MANA/USDT analysis :
#MANA is currently forming lower lows (LLs) and lower highs (LHs) while trading near the resistance zone. The price is expected to decline from this level and test previous lows. For a short entry, it is advisable to wait for a break below the $0.3370 level.
TF : 1D
Entry : $0.3370
Target : $0.2713
SL : $0.3752
#MANA is currently trading around $0.2843, testing a critical support zone ($0.25 - $0.28).This level previously acted as a strong demand zone in September 2024 before the major uptrend.🔥✅
Further,MANA is testing a critical support zone ($0.25 - $0.28). If buyers hold this level, we could see a bounce toward $0.35 - $0.38. However, a breakdown below $0.25 could lead to a further drop toward $0.20 - $0.22 .🔥✅😍👀✅🔥
#MANA has tested the SR zones and formed upside liquidity. It is forming a correction/HL till golden ratio and took small correction.🔥✅
Further, MANA have potential to go for 500% profit in ALT season .🔥✅😍👀✅🔥😳
💰#MANA has a rising wedge pattern on 6H Time frame,we expect another bullish leg from the Green zone,send it to the next level 🚀
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️