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.
322 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
8
votes
2
answers
463
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
289
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
292
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
128
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
65
views
2
votes
2
answers
100
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:
...
1
vote
1
answer
86
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
62
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
141
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 ...
2
votes
2
answers
66
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
155
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 ...
5
votes
2
answers
129
views
A shell function to copy files and directories, preserving directory structure
For a script, I came up with a shell function that might be generally useful. Before I add it to the code base, I’d like to hear someone’s opinion on this.
I don’t write shell scripts often and had to ...
7
votes
7
answers
465
views
A simple shell in C
The M-Shell (msh) provides a basic command-line interface similar, and features some builtins (cd, exit, help, whoami, kill).
...
1
vote
1
answer
49
views
Yet another sh script to backup one directory
A single directory should simply be backed up with the zip tool, and the time of the backup should be preserved in the file name. I have written a Posix shell script for this.
Can this script simply ...