Most active questions
82 questions from the last 7 days
3 votes
3 answers
871 views
How do I ensure a bash script argument is a specific value?
The following script is supposed to check $1 and see if it is a specific value. It only works when one Bash [[... =~ ...]] regex check is passed in an if statement. The error is: When more than one ...
0 votes
1 answer
741 views
Why is this FAT filesystem recording access time?
FAT isn't meant to record file access time, but the FAT filesystem I have in a VeraCrypt container file does. Why is this? This was before I opened the file /run/media/veracrypt1/test: ~ $ stat /run/...
7 votes
4 answers
461 views
How to separate start directories and expression in `find`?
find takes an (optional) list of (what the man page calls) "starting points", i.e. directories, followed by an expression. Is there a way to cleanly separate both types of arguments so that ...
7 votes
2 answers
418 views
Why does crontab use a wrong editor?
man crontab reads: The -e option is used to edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables. After you exit from the editor, the modified ...
4 votes
3 answers
293 views
Headless disk-mount with user permissions
There is a headless machine, with Debian as its OS: $ cat /etc/issue Debian GNU/Linux 11 \n \l $ uname -a Linux mymachine 6.1.99 #33 SMP Tue Jan 21 11:32:39 CST 2025 aarch64 GNU/Linux What I wish to ...
5 votes
1 answer
238 views
What is the USER= value reported for sudo attempts?
On my Arch system, failed attempts to run sudo cause a line like this to be added to the logs (note the USER=root): Nov 20 14:59:31 oregano sudo[191472]: bob : user NOT in sudoers ; TTY=pts/26 ; ...
4 votes
1 answer
176 views
Choice of field separator affects sort's ordering
Suppose we have a script named test_sort in our $PATH with the following contents: #!/bin/bash function echo_text () { printf -- "%s\n" "$fc$oc$fs$lc" printf -- "%s\n&...
4 votes
1 answer
179 views
sshfs to a host requiring OTP pw
In my environment I have: a Jenkins build server that I can ssh into using private/public keys. I can use sshfs to mount its file system on my local pc (running WSL on Windows 11, ugh but I can't ...
0 votes
2 answers
57 views
How to replace all `[` and `]` in sed?
Logical way would be to use an 's/[\[\]]/_/g' regexp replace, however it does not work as intended to. It replaces a chain of [ and ] with a single _. $ echo 'x[]x'|sed -E -e 's/[\[\]]/_/g' x_x $ echo ...
2 votes
1 answer
197 views
Replacing the domain string in the compiled binary file with an IP address
Just in theory: is it possible to replace the domain string in the compiled binary file with an IP address by editing a binary file in place with sed? (IP address belongs to a different domain, but ...
2 votes
3 answers
64 views
How can I use sed to chain append lines from a text file, add it as a suffix to the text on the same lines numbers on another file, and so on?
I've tried using sed for this. I've tried putting the lines of interest in variables as well. I have two examples I want to achieve for now. Lets say I have thousands of urls in a file called links....
1 vote
2 answers
139 views
How changing the terminal letters color and its whole background at the same time, using separate RGB or color codes?
It's often that when I am in a subject involving many processes of two or three kinds, I'm noticing that: one terminal I've opened is dedicated for my subject of kind #1, while another is opened to ...
0 votes
2 answers
131 views
Process sed capture group with a bash function before replacement: "sh: 1: <bash function>: not found"
So, I was playing around with this answer, when I found that neither printf_stdin () { read input printf "$input" } sed "/lorem ipsum foobar/ { s/'/'\"'\"'/g s/\...
3 votes
1 answer
92 views
Wine cmd automatically escapes quotes, adds backslash
$ wine cmd /c 'echo "hello world"' \"hello world\" Where do the backslashes come from? The command behaves differently in an interactive session: $ wine cmd Microsoft Windows 6.1....
1 vote
1 answer
103 views
Pacman upgrade fails with "Failed to start up manager. Freezing execution"
I have a VPS running Arch (Kernel 6.17.6-arch1-1). A pacman -Syu upgrade on 2025-11-12 failed with warnings and errors about systemd. In /var/log/pacman.log, I found the error messages: […] [2025-11-...