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.
 324 questions
 
 - Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
 
 3
 
 votes
 
 
 
 2
 
 answers
 
 
 
 583
 
 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
 
 
 
 477
 
 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
 
 
 
 301
 
 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
 
 
 
 311
 
 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
 
 
 
 144
 
 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
 
 
 
 80
 
 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
 
 
 
 100
 
 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
 
 
 
 75
 
 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
 
 
 
 170
 
 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
 
 
 
 107
 
 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
 
 
 
 166
 
 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
 
 
 
 145
 
 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 ...