А знаете ли вы, что в 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
#HOOK/USDT analysis :
#HOOK has successfully broken out from the trendline and subsequently retested it, indicating a shift in direction towards the upside.
This suggests that bullish momentum is likely to persist, with potential for testing higher price levels in the near future.
TF : 4h
Entry : $0.2850
Target : $0.3240
SL : $0.2716
#HOOK/USDT analysis :
#HOOK is in a downtrend, trading below the 200 EMA. The price is currently experiencing a pullback and is expected to test the resistance zone before continuing its bearish trend. The price is expected to test the resistance zone while continuing its bearish momentum to test previous lows.
TF : 4H
Entry : $0.4173
Target : $0.3485
SL : $0.4477
#HOOK/USDT analysis :
#HOOK is in a downtrend, expected to keep up its bearish momentum. The price has already broken out of the trendline, triggering the entry. Target the previous swing low as a potential target level.
TF : 15min
Entry : $0.3558
Target : $0.3208
SL : $0.3746
#HOOK/USDT analysis :
#HOOK has broken out of the trendline with impulsive bullish momentum. It is expected to test the previous swing high. Aim for it as a potential target level, as bullish momentum is expected to continue on LTF.
TF : 5min
Entry : $0.3475
Target : $0.3696
SL : $0.3332
#HOOK/USDT analysis -
#HOOK shows a rejection from the resistance zone after establishing a lower low. There is an anticipation of further decline from this point with a potential retest of the previous low. For a short entry, wait for a pullback to the resistance zone.
TF : 2h
Entry : $0.4959
Target : $0.4003
SL : $0.5155
#HOOK/USDT analysis -
#HOOK is currently in a downtrend, hitting new lows and trading below the 200 EMA. The price is currently testing the resistance zone after an impulsive move. It is anticipated that the price will reject from there and continue to test new lows shortly. Enter when the price begins declining from the resistance zone. The previous swing low will be the target level.
TF : 1h
Entry : $0.5767
Target : $0.5316
SL : $0.6036
#HOOK/USDT analysis -
#HOOK is in a downtrend, trading below the 200 EMA. The price is currently going through a pullback and has retraced to previous support levels near the 200 EMA. Currently, the price is encountering resistance near the 200 EMA and has already broken the trendline, indicating an increase in bearish pressure on the price. To confirm entry, wait for the price to break below the $0.5997 level to go short, with previous swing lows as potential target levels.
TF : 30min
Entry : $0.5997
Target : $0.5446
SL : $0.6337