А знаете ли вы, что в 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
📰 Ubuntu 26.10 Development Officially Begins as ‘Stonking Stingray’ Takes Shape
by George WhittakerCanonical has officially kicked off development planning for Ubuntu 26.10, the next interim release of the popular Linux distribution. Codenamed “Stonking Stingray,” the release is scheduled to arrive on October 15, 2026, continuing Ubuntu’s predictable six-month development cycle.Although Ubuntu 26.
🔗 Source: https://www.linuxjournal.com/content/ubuntu-2610-development-officially-begins-stonking-stingray-takes-shape
#linux#ubuntu
📰 Canonical developer lays out some AI plans for Ubuntu Linux
AI in your Ubuntu Desktop? Eventually, it seems. Canonical will need to tread very carefully on this one but plans are being made for it.Read the full article on GamingOnLinux.
🔗 Source: https://www.gamingonlinux.com/2026/04/canonical-developer-lays-out-some-ai-plans-for-ubuntu-linux/
#linux#ubuntu
📰 Ubuntu Looks Toward More Snap-Based Devpacks Moving Forward
Canonical is out with a new blog post today outlining toolchain changes to Ubuntu Linux from Ubuntu 24.04 LTS to Ubuntu 26.04 LTS due for release tomorrow. While those changes over the past two years aren't too news worthy if you have been following the interim Ubuntu releases, what's interesting is their road ahead on the Ubuntu toolchain front for developers...
🔗 Source: https://www.phoronix.com/news/Ubuntu-More-Devpacks-Future
#linux#ubuntu
📰 Ubuntu MATE Leader Stepping Down, Seeking New Contributors
After starting and leading the Ubuntu MATE flavor since 2014, Martin Wimpress announced he's looking to step down from leading this flavor of Ubuntu Linux with the MATE desktop environment. He's hoping for new passionate contributors to keep it going...
🔗 Source: https://www.phoronix.com/news/Ubuntu-MATE-Needs-Leader
#linux#ubuntu
📰 Ubuntu Will Switch To ntpd-rs As Its Next Rust System Component
Canonical engineers are planning a switch to ntpd-rs as the newest Rust-based system component for Ubuntu Linux for handling time synchronization...
🔗 Source: https://www.phoronix.com/news/Ubuntu-Switching-To-ntpd-rs
#ubuntu#linux
📰 Kagi’s Orion browser hits public beta on Linux
Kagi's privacy-focused Orion browser has reached public beta on Linux. Here's what works, what doesn't and how to install it on Ubuntu.You're reading Kagi’s Orion browser hits public beta on Linux, a blog post from OMG! Ubuntu. Do not reproduce elsewhere without permission.
🔗 Source: https://www.omgubuntu.co.uk/2026/03/orion-for-linux-beta-release
#ubuntu#linux
📰 eCryptfs Sees Renewed Patch Activity With Linux 7.0
We haven't heard much about eCryptfs in recent years for that stackable in-tree Linux file-system providing per-directory encryption support. The FSCRYPT framework has shown its strong capabilities in recent years with various file-systems, Canonical hasn't been pursuing its user home directory encryption like it did years ago for the Ubuntu desktop, and full disk encryption is the most secure approach for ensuring data security on your system.
🔗 Source: https://www.phoronix.com/news/Linux-7.0-eCryptfs
#linux#ubuntu
📰 Ghostty terminal is finally adding scrollbar support
Ghostty's most-thumbed feature request is finally being answered. Yup, scrollbar support is finally coming in Ghostty 1.3 for Linux and macOS.You're reading Ghostty terminal is finally adding scrollbar support, a blog post from OMG! Ubuntu. Do not reproduce elsewhere without permission.
🔗 Source: https://www.omgubuntu.co.uk/2026/02/ghostty-linux-scrollbars-coming
#linux#ubuntu
📰 BleachBit 5.1.0 Beta adds cookie manager and expert mode
BleachBit 5.1.0 beta is out with a new cookie manager, expert mode to prevent accidental data loss, new browser support, and fixes for Linux users.You're reading BleachBit 5.1.0 Beta adds cookie manager and expert mode, a blog post from OMG! Ubuntu. Do not reproduce elsewhere without permission.
🔗 Source: https://www.omgubuntu.co.uk/2026/02/bleachbit-beta-cookie-manager-expert-mode
#linux#ubuntu
📰Ubuntu 26.04 splits firmware package to simplify updates
Ubuntu 26.04 LTS (Resolute Raccoon) is changing how hardware support updates are handled, splitting its single linux-firmware package into 17 vendor-specific sub-packages. The new approach aims to reduce the size of routine firmware updates for most users. Currently, firmware files are contained in a single package, which has grown to more than 500MB in download size in recent releases (and uses as much as 1GB disk space when installed).
🔗 Source: https://www.omgubuntu.co.uk/2026/02/ubuntu-26-04-firmware-split
#linux#ubuntu
Windows 10 支持即将结束——但“终结 10”希望你切换到 Linux
随着 Windows 10 支持即将结束,一个名为“终结 10”的倡议正在鼓励用户转向 Linux 操作系统。 该倡议旨在劝退 Windows 10 用户购买新的 Windows 11 设备,转而推荐安装 Linux。 此举反映了对微软操作系统更新策略的某种回应,并为用户提供了替代方案,以延长旧硬件的使用寿命并避免升级成本。Tom's Hardware | END OF 10
🏷#Windows#Linux#升级#ENDOF10
📢频道👥群组📝投稿