А знаете ли вы, что в 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
📰 Fedora is becoming the default Linux recommendation, and Ubuntu did this to itself
Ubuntu used to be the easiest recommendation for a new Linux user, but recent bad decisions have caused things to shift in favor of Fedora.
🔗 Source: https://www.xda-developers.com/fedora-becoming-default-linux-recommendation-ubuntu-fault/
#fedora#linux#ubuntu
📰 Ubuntu, Fedora, Linux Mint Eye Age Verification Amid California Law Backlash
California's upcoming Digital Age Assurance Act law requires OSes to let users input their birth date during the setup to follow child privacy rules.
🔗 Source: https://9to5linux.com/ubuntu-fedora-linux-mint-eye-age-verification-amid-california-law-backlash
#ubuntu#fedora#linux
📰 NVIDIA-VAAPI-Driver 0.0.17 Fixes Support For GB10 Powered Systems
The open-source, community-developed NVIDIA-VAAPI-Driver that provides a Video Acceleration API (VA-API) implementation built atop NVIDIA's NVDEC video decode interface is out with a new release. This is the open-source project that's motivated by getting accelerated video decoding to work within Mozilla Firefox and other apps when running with NVIDIA's packaged Linux driver...
🔗 Source: https://www.phoronix.com/news/NVIDIA-VAAPI-Driver-0.0.17
#firefox#linux#opensource
📰 Firefox 150 Promises Support for the GTK Emoji Picker on Linux, Beta Out Now
Firefox 150 open-source web browser is now available for public beta testing with support for the GTK emoji picker on Linux, extended local network access restrictions, and more.
🔗 Source: https://9to5linux.com/firefox-150-promises-support-for-the-gtk-emoji-picker-on-linux-beta-out-now
#opensource#linux#firefox
📰 Firefox 149 Web Browser Is Now Available for Download, This Is What’s New
Firefox 149 open-source web browser is now available for download with Split View, XDG portal file picker support on Linux, new TrustPanel, faster PDF rendering, updated Firefox error pages, and more. Here's what's new!
🔗 Source: https://9to5linux.com/firefox-149-web-browser-is-now-available-for-download-this-is-whats-new
#firefox#opensource#linux
🚀DevOps o‘rganmoqchimisiz? Bepul laboratoriyalar tayyor!
KodeKloud — bu bepul o‘quv muhiti bo‘lib, siz quyidagi texnologiyalarni interaktiv tarzda o‘rganishingiz mumkin:
● Docker
● Kubernetes
● Linux
● Terraform
● Ansible va boshqalar
🌐 Hammasi brauzerda ishlaydi! Hech narsa o‘rnatishingiz shart emas. Saytni ochasiz — amaliy topshiriqlarni bajarasiz.
💡 Har bir laboratoriya interaktiv bo‘lib, siz faqat video tomosha qilmay, balki har bir buyruqni o‘zingiz yozib bajarishni o‘rganasiz.
👉 Rasmiy sayt:kodekloud.com/free-labs
🔥 DevOps’ga yangi kirayotganlar yoki mavjud bilimini oshirmoqchi bo‘lganlar uchun — haqiqiy manba!
#DevOps#Docker#Kubernetes#Linux#Terraform#KodeKloud
💻@dasturlash_hayoti — bir xatoni tuzatib, ikkinchisiga tayyorlanish! 😅
📰 LACT 0.9 Released With UI Updates, Voltage-Frequency Curve Editor For NVIDIA
LACT, one of the leading open-source solutions to provide a graphics card management GUI that works across AMD / NVIDIA / Intel graphics hardware on Linux, is out with a major update this weekend...
🔗 Source: https://www.phoronix.com/news/LACT-0.9-Released
#amd#intel#linux#opensource
📰 AMD EPYC Achieves 5G/6G RAN Performance Leadership With New OCUDU Project
Announced this week at Mobile World Congress (MWC) by the Linux Foundation was the establishing of the OCUDU Ecosystem Foundation for advancing open-source AI-RAN (Radio Access Network) innovations. OCUDU is building a reference platform and innovations around 5G and early 6G network solutions. With OCUDU being benchmark-friendly, I have been putting the early code through some performance tests on current AMD EPYC and Intel Xeon server...
🔗 Source: https://www.phoronix.com/review/amd-epyc-intel-xeon-ocudu
#opensource#linux#intel#amd
📰More ASUS Desktop Motherboards Will Support Sensor Monitoring With Linux 7.1
ASUS desktop motherboards have been seeing broader sensor monitoring support on Linux in recent years. ASUS motherboards for Intel and AMD processors have been seeing more support added thanks to the open-source community with new additions to the likes of the ASUS-EC-Sensors driver and other hardware monitoring (HWMON) driver code. This is continuing for Linux 7.1...
🔗 Source: https://www.phoronix.com/news/ASUS-More-Sensors-Linux-7.1
#amd#linux#intel#opensource
📰Bork in Prague: SUSE's keynote gods demand their tribute
Linux vendor touts European independence while rate limits, Chromium popups, and cold sparks steal the show BORK!BORK!BORK! The keynote gods are a fickle bunch, as SUSE discovered at its annual shindig in Prague. What should have been a slick edge demo instead served up error pages to unsuspecting attendees, while keynote presentations attracted some unwelcome visitors.…
🔗 Source: https://go.theregister.com/feed/www.theregister.com/2026/04/29/never_anger_the_keynote_demo/
#chromium#linux