А знаете ли вы, что в 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
⭕️ «Otra de las características de esta reciente sedición fue la violencia; como la del #Daesh.
- ¡Estos, como el Daesh, prendieron fuego a personas! ¡Prendieron fuego, destrozaron, decapitaron! Estos también hicieron las mismas cosas que hacía el Daesh...» (01/02/2026).
🔗 LEER 👉spanish.khamenei.ir/news/7144
✅@khamenei_es
KHAMENEI.IR | 𝕏 | Facebook| TikTok
According to the British newspaper, The Times, ISIS operates in the central Syrian desert, organizes sleeper cells, launches hit-and-run attacks and deadly ambushes, and assassinates Syrian tribal and clan leaders who oppose the group. Everything happens as the group takes advantage of the current state of chaos.
#Syria#ISIS#Daesh#Tartous
#Saudi_Arabia opens the first liquor store
Reuters and France news agencies claimed that the Kingdom of Saudi Arabia is preparing to open the first liquor store in the city of Riyadh.
According to the document, a copy of which was seen by Reuters, customers must register through a mobile app and after receiving a code from the State Department, they can purchase their monthly quotas at a special store.
Saudi Arabia is the largest #Wahhabi center in the world. They pay for Wahhabi schools in #Pakistan, #Afghanistan by selling oil. Graduates of these schools join #terrorist groups such as al-Qaeda, Taliban, #Daesh, Al-Nusra, Jaish al-Adl and blow themselves up among other Muslims to go to heaven. Mohammed bin Salman, the leader of Saudi Arabia, follows the path of Atatürk in #Turkey. Drinking alcohol is forbidden in Islam.
https://t.me/YediotNewsChat
🚨‼️ ATTENTA A MOSCOU 🇷🇺
TERRORISME AUTORISÉ 🤮–L’ambassade d’Ukraine a tranquillement recruté les tueurs du Crocus au Tadjikistan
Quelques semaines avant le carnage, un appel à candidatures de tueurs a été ouvertement publié sur le site de l'ambassade d'Ukraine au Tadjikistan.
L’opération a été dirigée personnellement par l'ambassadeur d'Ukraine, Valeriy Yevdokimov, qui se trouve être l’ex-chef du renseignement étranger de Zelensky.
La page du site a été effacée, mais des captures d’écran ont été faites.
«Les commanditaires les ont recrutés afin de donner au public occidental l’image qu’ils étaient soi-disant islamistes, retrace le haut fonctionnaire russe Alexandre Malkevitch
Il s'agit d'une opération des services de renseignement occidentaux et d’une tentative de mettre le public sur une mauvaise piste.
… Mot d’ordre immédiatement relayé par les médias occidentaux.
NB : VOUS COMPRENEZ POURQUOI LES ÉTATS-UNIS, L'ANGLETERRE ET LA FRANCE, AVEC LEUR ORGANE DE PROPAGANDE
#AttentatMoscou#MoscowAttack | Zelensky | THE CIA | #Moscou | Crocus City Hall | #CIA | #NATO | #VictoriaNuland | #DAESH | ISIS | #DGSE
@egountchibehanzinofficiel
#ManagmentdelaTerreur La #Russie chamboule tellement leur hégémonie en #Afrique, leur nouvelle ordre mondiale. Les gouvernement mondialistes (États-Unis 🇺🇸, France 🇫🇷, Angleterre 🏴 ), subissent une berezina en #Ukraine alors cela active des vieilles méthodes bien connues. Des attaques sous fausse bannière qu'ils appellent attaque terroriste de #Daesh.
Nous sommes en 2024, les peuples sont maintenant éveillés.
Cela ne passe plus. Tout se sait !
Vidéo ne ligne ! https://youtu.be/R0_aXILQ7Mk?feature=shared
#Usa#Moscou#Otan#Cia#Dgse#Ml6
@egountchibehanzinOfficiel