А знаете ли вы, что в 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
#LUNC/USDT analysis :
#LUNC is currently in a downtrend, forming lower lows (LLs) and lower highs (LHs) below the 200 EMA. The price has retraced to the 200 EMA and the resistance zone. It is anticipated that the price will continue its bearish momentum and test lower levels.
TF : 1D
Entry : $0.00008532
Target : $0.00006396
SL : $0.00011356
#LUNC/USDT analysis :
#LUNC is presently in a downtrend, trading below the 200 EMA. The price is facing resistance in the current zone, suggesting a possible reversal point. It is expected that the price will reverse from this resistance area and continue its bearish path, potentially revisiting previous low levels.
TF : 2h
Entry : $0.0000765
Target : $0.0000713
SL : $0.0000788
#LUNC/USDT analysis :
#LUNC is currently experiencing a downtrend, trading below the 200 Exponential Moving Average (EMA). The price is encountering resistance in the current zone, indicating a potential reversal point. It is anticipated that the price will reverse from this resistance area and persist in its bearish trajectory, likely retesting prior low levels.
TF : 30min
Entry : $0.0000764
Target : $0.0000716
SL : $0.0000793
#LUNC/USDT analysis :
#LUNC has experienced a breakout followed by a retest of the resistance zone, which has now transformed into a support zone. It is anticipated that the price will receive support at this level, leading to a potential upward movement to sustain its bullish trend and challenge the previous peak.
TF : 4h
Entry : $0.0000835
Target : $0.0000948
SL : $0.0000785
💰#LUNC reached -Order block zone on Daily Time frame,we need breakup from this area to continue the pump and reach the target price zone (0.0005) otherwise will have a correction until the + order block (the Green zone)✅
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️
💰#LUNC broken up the falling wedge pattern on 12H Time frame,also pullback confirmed,we can buy some lunc here🐋
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️
💰#LUNC rejected from the Trendline on 4H Time frame,we are waiting to see the price reaction to the Support zone..⏳
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️