А знаете ли вы, что в 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
📰 AerynOS Gets New Branding and Updated Desktop Stacks
AerynOS 2026.05 arrives with refreshed branding, GNOME 50.1, KDE Plasma 6.6.4, COSMIC 1.0.11, and Linux kernel 7.0.2.
🔗 Source: https://linuxiac.com/aerynos-gets-new-branding-and-updated-desktop-stacks/
#gnome#kde#kernel#linux#plasma
📰 AerynOS March 2026 Update Brings GNOME 50, KDE 6.6.3, and Linux 6.18
AerynOS March alpha ISO brings GNOME 50, KDE Plasma 6.6.3, Linux kernel 6.18, and tooling improvements across moss and boulder.
🔗 Source: https://linuxiac.com/aerynos-march-2026-update-brings-gnome-50-kde-6-6-3-and-linux-6-18/
#kde#linux#kernel#plasma#gnome
📰 Slackware-Based PorteuX 2.6 Released with Linux 6.19, TLP Support, and More
PorteuX 2.6 Linux distribution is now available for download with Linux kernel 6.19, GNOME 49.4, KDE Plasma 6.5.5, Cinnamon 6.6, and more. Here’s what else is new!
🔗 Source: https://9to5linux.com/slackware-based-porteux-2-6-released-with-linux-6-19-tlp-support-and-more
#linux#gnome#kde#plasma#kernel
📰 Linux 7.0 Release, Age Verification Laws, Ryzen 9 9950X3D2 & Other April Happenings
A lot happened in the Linux and open-source world during the month of April. Ubuntu 26.04 LTS and Fedora 44 shipped, a lot of news around age attestation/verification laws, the Linux 7.0 kernel was released, Linux 7.1 is bringing many exciting changes as well as removing of old hardware drivers, the Ryzen 9 9950X3D2 Dual Edition CPU was released, we began testing the Intel Arc Pro B70 "BMG-G31", and much more software and hardware content that...
🔗 Source: https://www.phoronix.com/news/April-2026-Highlights
#fedora#intel#kernel#linux#opensource#ubuntu
📰 BunsenLabs Carbon Is Here with Support for Wayland Sessions, Based on Debian 13
BunsenLabs Carbon Linux distribution is now available for download with support for Wayland session, based on Debian GNU/Linux 13 "Trixie". Here's what's new!
🔗 Source: https://9to5linux.com/bunsenlabs-carbon-is-here-with-support-for-wayland-sessions-based-on-debian-13
#linux#debian#gnu#wayland
📰 Calamares Linux Graphical Installer Now Supports KDE’s Plasma Login Manager
Calamares 3.4.2 open-source universal graphical installer for GNU/Linux distributions is now available for download with support for Plasma Login Manager. Here’s what’s new!
🔗 Source: https://9to5linux.com/calamares-linux-graphical-installer-now-supports-kdes-plasma-login-manager
#plasma#gnu#kde#linux#opensource
#qml#dotfiles#hyprland#linux#material_design#quickshell#rice#ricing#unixporn#wayland
This Hyprland dotfiles setup gives you a modern, easy-to-use Linux desktop with features like a live app overview, AI integration (Gemini and Ollama), and automatic, beautiful color themes that match your wallpaper. Installation is simple with a one-line command, and the default keybinds are familiar if you’ve used Windows or GNOME. The system uses Quickshell for widgets (not Waybar), shows every command during setup for transparency, and offers a friendly Discord community for help. You benefit from a polished, customizable environment that’s both visually appealing and practical, with support for new users and advanced customization options.
https://github.com/end-4/dots-hyprland
📰antiX 26 Released as Systemd-Free Debian 13 Distro with Five Init Systems
antiX Linux 26 arrives based on Debian 13 Trixie with five init systems, a systemd-free design, and a fast, lightweight environment built for efficiency.
🔗 Source: https://linuxiac.com/antix-26-released-as-systemd-free-debian-13-distro-with-five-init-systems/
#debian#systemd#linux#distro
📰 Budgie 10.10.2 Brings Improved Labwc Wayland Compositor Integration
Out today is Budgie 10.10.2 as the latest minor update to this open-source desktop environment that began as part of the Solus Linux project...
🔗 Source: https://www.phoronix.com/news/Budgie-10.10.2-Released
#wayland#budgie#opensource#linux
#shell#arch#bash#discord#dpi#goodbyedpi#linux#nfqws#nftables#ubuntu#youtube#zapret
This Linux script (tested on Ubuntu 24.04 and Arch) easily sets up Zapret to bypass YouTube slowdowns and Discord blocks using Flowseal configs. Clone the repo, run `sudo bash main_script.sh` to pick a strategy (like general.bat), network interface, and save settings in conf.env for quick non-interactive launches or auto-start via `sudo bash service.sh`. It uses nftables, cleans up on stop, and skips auto-updates to stay stable. You get fast, reliable access to YouTube videos and Discord chats without hassle.
https://github.com/Sergeydigl3/zapret-discord-youtube-linux