Answer by Kamil Maciorowski for How to achieve side by side output in Bash?
A portable tool for this is paste:( echo A echo a echo B echo b echo C echo c echo D echo d) | paste - -From the specification:The default operation of paste shall concatenate the corresponding lines...
View ArticleComment by Kamil Maciorowski on Batch files run through Task Scheduler aren't...
The solution shall be in the answer, not in the question. I have moved it for you. Please review, check if nothing is missing.
View ArticleComment by Kamil Maciorowski on How to make sure a process spawned via ssh...
KillUserSomething=? At first I thought "Something" here is a wildcard and you're talking about a "family" of options. It seems the only matching option in man 5 logind.conf is KillUserProcesses=. What...
View ArticleAnswer by Kamil Maciorowski for How to tell if SIGWINCH has been activated in...
AnalysisFor me your script kinda works in tmux in konsole (I just needed to remove the last echo from the function to make the whole box stay visible). The script does not work in the way (I think) you...
View ArticleAnswer by Kamil Maciorowski for What does #* mean in Bash?
${parameter%[word]}Remove Smallest Suffix Pattern. The word shall be expanded to produce a pattern. The parameter expansion shall then result in parameter, with the smallest portion of the suffix...
View ArticleAnswer by Kamil Maciorowski for SSH parameterized config entries?
The below solution was tested with ssh from OpenSSH, version 9.3 (but it should work with reasonably non-ancient older versions as well, I guess from 7.2 where bz#2471 was fixed). For 9.4 and later see...
View ArticleComment by Kamil Maciorowski on The screen is not currently set to the...
"This message appears on a machine with Ubuntu …" – Are you sure it's not a message from the monitor itself? You interact with it by pressing buttons of the monitor, right? I'm pointing this out...
View ArticleComment by Kamil Maciorowski on How do I remotely start a mini-PC?
Also note that Wake On LAN is designed to work on LAN. I routinely ssh via Internet to a certain remote router (running OpenWrt, always on) and etherwake a "big" PC from it via their LAN. The (wired)...
View ArticleComment by Kamil Maciorowski on Rufus failed. Now USB error message: "No...
Does this answer your question? USB flash drive not working or is appearing as an empty disk drive, Disk Management reports "No Media" with 0 bytes size
View ArticleComment by Kamil Maciorowski on How to see all IP Addresses in the same LAN...
There is no need to see all addresses. Let the colleague check the IP (ipconfig /all, I believe) and tell it to you.
View ArticleComment by Kamil Maciorowski on Set terminal color without having bash...
Also: askubuntu.com/a/831973/693277 . And you don't really need printf.
View ArticleAnswer by Kamil Maciorowski for tmux - How to change text color of current...
Moving to another pane does not trigger pane-mode-changed, it triggers window-pane-changed. The simplest improvement is to define two hooks:set-hook -g pane-mode-changed '…' # you already have...
View ArticleComment by Kamil Maciorowski on Why my terminal throws control characters...
Right arrow is transmitted as ^[[C, where ^[ denotes a single byte, the escape character (octal 033). The problem is as if something consumed this byte, but not always. Or maybemysql-client requires...
View ArticleComment by Kamil Maciorowski on Lost USB by dd-ing a bigger image on it
dd (or Rufus, or balenaEtcher, or …) cannot directly break a USB flash drive (nor any drive). In general drives very rarely die randomly when being disconnected or idle, but they die randomly when...
View ArticleComment by Kamil Maciorowski on How can I get back into the output of a .sh...
How would you "run other other commands like /backup or /stop" if start.sh was in the foreground?
View ArticleComment by Kamil Maciorowski on Clearing the terminal without deleting anything
Similar: How can I make clear preserve entire scrollback buffer?
View ArticleComment by Kamil Maciorowski on Linux command logging
Please do not cross-post. For the record, the other copy is on Unix & Linux SE.
View ArticleAnswer by Kamil Maciorowski for merge numbered files from different...
it works fine but only if all pictures are png and if there is no whitespace in the folder names.The latter flaw is a common one, the solution is known: quote right. Get used to double-quoting.To make...
View ArticleAnswer by Kamil Maciorowski for 7zip fails to unpack rar under Debian
7z requires the first argument to be a command it understands. The command to extract files with full paths is x.7z x ../Archive.rarThere are other commands. See man 1 7z.
View Article