Questions tagged [shell]
The term 'shell' refers to a general class of text-based command interpreters most often associated with the Unix & Linux operating systems.
325 questions
6
votes
1
answer
114
views
Bash tool for automating Telnet/SSH commands with live interactive session takeover
I made this executable because I used to play on a MUD, which was essentially a server to which you connect to through telnet to play in a multiplayer world. What annoyed me was how difficult it was ...
3
votes
2
answers
602
views
Final look at my Lightshot print screen Linux handler POSIX shell script
I would like to ask for a final review of my Lightshot print screen Linux handler POSIX shell script.
When I started writing it, it was a one-liner (shell snippet), but then I decided to grow it, and ...
8
votes
2
answers
478
views
Disabling local accounts on Azure Linux virtual machines
We’re enforcing Azure Entra authentication across all Linux VMs, so we’ll disable all local accounts via a custom script. The script will also create a single “break-glass” user with a randomly ...
8
votes
2
answers
303
views
Simple Node.js version manager
On Arch Linux, there are 2 packages that provide the Rust toolchain: rust itself and rustup. When users try to install a package ...
12
votes
3
answers
1k
views
Simplified simulation of Unix "ls" command made using C++ std::filesystem library
I have just implemented this while getting acquainted with the std::filesystem library.
On input from console, the program accepts two arguments: ...
7
votes
3
answers
319
views
lndir shell function - hardlink two directories
The code works, but I could use help testing it more comprehensively and double-checking that everything I'm doing makes sense, and that all the options can coexist with each other. I'm running into ...
1
vote
2
answers
152
views
Start screen lock for user from systemd
This is a script to start a screen lock in Ubuntu, with user customizable background image(s).
The script will eventually be run on sleep by systemd, so by root. This made it complicated to let the ...
4
votes
1
answer
82
views
2
votes
2
answers
115
views
Using git autobackup with shell script
I have php website for prevent hacker modify any file and inject backdoor.
I want to use git as a file tracking solution. This is my shell script:
...
0
votes
1
answer
104
views
Rust code to print shell prompt
I'm new to Rust, and this is my first successful significant Rust code. It prints a prompt(which is technically a string) to the console.
I'm struggling with concepts like ...
2
votes
0
answers
77
views
Replace real path with symlink
zoxide is a replacement for cd that allows fuzzy matching against commonly accessed directories (e.g., ...
3
votes
4
answers
174
views
Bash script to automate post install process on Fedora
The script runs fine, and it seems to be working correctly. I'm looking for some criticism of the structure of the code, errors, bad practices, beginner's pitfalls, and bad code in general.
I'm ...
1
vote
0
answers
109
views
Conflict-less Bash library function and variable naming
Marvelous Bash does not support built-in sufficient namespace features for functions or variables to specific file/module you would find in PHP or JavaScript.
Conflicts in global scopes, which are ...
2
votes
2
answers
81
views
Check if program has been installed successfully at a given path
The path is provided as an argument by a Makefile within an install target. The script verifies if the specified path is already included in the system's ...
2
votes
1
answer
170
views
Update a docker compose service properly
I'm currently running an executable in Docker that has been mounted as a Docker volume in the foreground. The executable (or the service) continuously generates console output and can be interrupted ...