Why does local out=$(cmd) hide the command's exit status?
In a Bash function, I noticed that local out=$(false) reports success, but declaring out first and then assigning out=$(false) reports failure. Why are they different, and what's a…
In a Bash function, I noticed that local out=$(false) reports success, but declaring out first and then assigning out=$(false) reports failure. Why are they different, and what's a…
I'm looking for a read-only way to browse directories from a terminal, ideally with few dependencies for use on jump servers. What should I know about a Bash-based…
I want to learn another language for DevOps work. Which would be more useful to focus on first, and what kinds of tasks would make Go or Python…
I'm learning PowerShell on Windows and find it more intuitive than Bash. Would it be practical for everyday Linux administration and automation? What limitations should I expect, and…
I'm starting a Bash course that says macOS is fine but recommends a Linux VM. I've never used a VM, though I'd like to learn. Is it worth…
A cleanup function runs a failing command and then prints a success message. With set -e enabled, calling the function as an if condition still reaches the success…
In Bash 5.2, unsetting an associative array at script level makes declare -p report that it no longer exists. Inside a function, the same check prints declare --…
My script finds directories containing a .config directory, changes into each parent directory, and runs an update command. There are a few thousand of them, so sequential execution…
I want to automate the first password login to a machine so I can install a public key. Can Bash pass the password to SSH without using something…
I came across an interview question about collecting these metrics in Bash without top, free, df or any other external commands. Is reading /proc and /sys enough, and…
I'm new to Linux and interested in using the command line and automating small tasks. Should I start with Bash or Python?
I'm learning Bash and found an older guide to defensive scripting. Are there more current resources or practices worth following?Also, if a script needs a lot of checks…
I'm trying to disable button 4 on a mouse with rivalcfg. The command rivalcfg --buttons(button4=disabled) gives me a Bash syntax error near the opening parenthesis. What should the…
I'm new to Linux and Bash, and I want to make a text-based book readable from the terminal. The idea is to run something like tractatus 1.222 to…
I'm looking for terminal interfaces that I can use from Bash and keep reasonably consistent across Linux, BSD, and other systems. What tools would you recommend?I'd also be…
I saw that a Uniqlo shirt has an obfuscated bash script printed on it. How would you go about decoding it, and is there a meaning behind it?
I have directories named like [2020] Title and (2021) Title. How can I rename them to 2020 - Title and 2021 - Title in Bash?
I'm new to Linux and using Bash as my main interface. Can I keep the prompt visible at the bottom while scrolling through older output, type without jumping…
I can run steamosctl get-default-desktop-session in a terminal, but the same command in a Bash script reports no such file or directory. The script has a Bash shebang…
Iโm looking for something like LeetCode, but focused on Bash or shell commands. Iโd like regular practice to build muscle memory, rather than just beginner lessons or server…