I have on my Debian server a user1 with user1:x:1001:1001:,,,:/home/user1:/bin/bash and a user2 with user2:x:1002:1002::/home/user2:/usr/sbin/nologin I can establish an SSH remote port forwarding connection with both to this […]
Download dotfiles when SSH-ing with a bash login shell
I’m working with a lot of remote hosts that are changing a lot. To have a streamlined workflow on all hosts I’m downloading my personal dotfiles with bash […]
bash scripting: Saving and then processing file contents as a bash variable
I have a super complicated bash script that extracts results from a large output file (produced on a LINUX machine, just in case this is relevant). As part […]
Add Linux server to AD without entering password
When I run command: realm join -U adminuser@PORTON.COM.IL porton.com.il –verbose I am prompted to enter the password for adminuser@PORTON.COM.IL. Since I want to run this in a script […]
Run command via SSH, disconnect, send input to it later?
I am interested to know how can I run a process in SSH that accepts user input, then disconnect without interrupting anything (the process still runs), then come […]
How to configure systemd-resolved and systemd-networkd to use local DNS server for resolving local domains and remote DNS server for remote domains?
I’m connected to local area network with access to the Internet through gateway. There is DNS server in local network which is capable of resolving hostnames of computers […]
Tablet mode switching events are incorrect on Lenovo Yoga 7 2-in-1 laptop
I’m using a Lenovo Yoga 7 14ARP8. Currently on NixOS, but this issue seems to happen on other distros including Fedora. The issue This laptop has a 360 […]
Bash function comments before or inside the function [closed]
Does the Bash language have a standard that dictates whether comments about the function should precede the function or be placed inside of it. I have seen scripts […]
Which is a more portable way to comment a function? [closed]
Does the Bash language have a standard that dictates whether comments about the function should precede the function or be placed inside of it. If so, what is […]
BASH variable inside AWK that is itself an AWK command
Hi. I want to use a BASH variable inside AWK that is an AWK command. Here is my test code that I plan to make more complicated if […]
Bash: export does not work if preceeds a pipe redirection [duplicate]
Example 1 (export and tee): $ export var=1 | tee /dev/null $ echo $var $ Example 2 (null command between export and pipe): $ export var=1 && : […]
Bash printf float formatting became nonsensical and random
Bash printf floating number formatting (with %f or %g) is suddenly completely wrong, and changing all the time. An example output: $ export LC_ALL=C $ printf ‘%gn’ 1 […]