All Questions

1 vote
0 answers
18 views

While Loop Exits After Calling Function [duplicate]

I'm trying to do a db backup script using Bash. When adding a "Resume" feature to the script, I do the following loop calling defined functions to do step by step (depending on the .lock ...
James's user avatar
  • 111
1 vote
0 answers
50 views

Bitwise operator options for a non-gawk awk like mawk?

I would like to make my (g)awk scripts more portable, especially to mawk, since it's Debian's stock awk. I've always avoided things like length(array), and used array[outer, inner] for ...
fedorafan's user avatar
0 votes
0 answers
11 views

How do I make sure two entities manipulating the same SPI line with different linux modules don't collide, or is this handled by the kernel already?

TL;DR I am developing some code for my SPI display that also has an SD card reader on it for use on a Linux board. I'm trying to use mmc_spi with the SD card reader portion, concurrently with a ...
thecreamybeige's user avatar
0 votes
1 answer
36 views

basename complains about missing operand using unshare

If I try to create namespaces, basename complains about missing operand: sudo unshare --mount --ipc --uts --pid --fork --user /bin/bash basename: missing operand Try 'basename --help' for more ...
sebelk's user avatar
  • 4,469
0 votes
1 answer
13 views

Xournal++ how to delete text everywhere in document?

How can I delete a given phrase, say "the quick brown fox", from every page in a PDF? It's >500 pages so I'd rather not remove just every instance manually. I'd be OK with whiteout but ...
joel's user avatar
  • 101
0 votes
1 answer
33 views

Get a list of all user's commands from a non-interactive shell

I am writing a script that would automatically suggest some new aliases/functions to be added to a user's shell config. Before doing that, however, I would like to make sure the aliases being ...
zoickx's user avatar
  • 51
0 votes
0 answers
19 views

What does a locale’s codeset get used for?

According to glibc’s manual: Most locale names follow XPG syntax and consist of up to four parts: language[_territory[.codeset]][@modifier] For example, you could have a locale named zh_CN.GB18030 ...
Ginger Jesus's user avatar
0 votes
1 answer
53 views

Using RS-232 in linux

I have a panel pc which runs ubuntu server 22.04 and has a RS-232 port for communication. I bought a RS-232 to ttl module and connect ttl side to my raspberry pi 4 to create a serial communication. I ...
Saeid Haghighipour's user avatar
-2 votes
1 answer
23 views

Can Linux OpenVPN server be accessed with Windows 10 Build-in VPN?

I have an OpenVPN server installed on Linux (Linux Wonderland 4.19.0-25-amd64 #1 SMP Debian 4.19.289-2 (2023-08-08) x86_64) and it works fine with OpenVPN client on Windows 10. Is there a way to use ...
Damir Tenishev's user avatar
0 votes
0 answers
18 views

Permission denied when executing an rsync command using a third server to copy a file over to another server

I'm trying to copy files over from one server to another using a bastion server with rsync, so I have the list of origin servers and a list of target servers, the strange part is that when I use the ...
VaTo's user avatar
  • 3,181
0 votes
0 answers
7 views

How to setup strongswan VPN server on Linux Debian so that it could be used with Windows 10 built-in client?

I see that www.strongswan.org could be somehow used as a VPN server on Linux (Linux Wonderland 4.19.0-25-amd64 #1 SMP Debian 4.19.289-2 (2023-08-08) x86_64) which could be accessed by Windows 10 build-...
Damir Tenishev's user avatar
0 votes
0 answers
20 views

How to make sure a service, that may or may not exist/be loaded, is stoped?

I am trying to port a script that have the very banal and common use case: pkill -SIGTERM -eF some_pid_file very simple case: Pid file exist? Pid exist? kill it. If pid is present and we failed to ...
gcb's user avatar
  • 428
-2 votes
1 answer
59 views

How to convert multiple columns to rows in shell (unpivoting)

I have a tab separated table with hundreds of columns and rows, like that: OTUId AC0184 AC0250 AC0257 AC0258 AC0262 AC0263 AC0289 AC0293 OTU549024624 51659 0 0 0 0 0 0 0 OTU565712448 108 0 0 0 0 0 0 0 ...
babinecha's user avatar
0 votes
1 answer
10 views

tcsh piping ONLY stderr to null leaving stdout alone

running a tcsh in RHEL-8.10. doing a grep -l <something> * I get a bunch of Is a directory responses. in bash I would do grep -l <something> * 2>/dev/null to suppress that. What is the ...
ron's user avatar
  • 7,264
1 vote
0 answers
11 views

Group owner cannot write to file despite group permissions [duplicate]

I'm working on Ubuntu 20.04. I have a system user/group systembob and a system user alice. alice is a member of the systembob group, and has been for quite some time: $ getent group systembob ...
Borea Deitz's user avatar

15 30 50 per page