sh, aka Bourne Shell, is the Unix Shell, the standard shell since v7 Unix. POSIX has standardized the shell, and portable shell scripts should conform to /bin/sh syntax.
8
votes
0answers
33 views
POSIX shell compatible and POSIX conforming dirname implementation
The discussion in the comments of this answer made me wonder how hard it would be to write a built-in only version of dirname.
This is what I ended up with but I'm ...
8
votes
2answers
610 views
Fizz having an argument with Buzz
For my current project I need to validate responses. The requests will be send from multiple different shell scripts and should be controlled from another script. I'd never targeted a ...
4
votes
3answers
77 views
Bash script that checks if font is installed and installs it if necessary
I'm new to writing bash scripts and I was wondering if I could get someone's advice on a part of the script I'm working on.
Intended purpose of code
Check if a font is installed by using ...
2
votes
1answer
29 views
Bash script that checks for package dependencies and installs them if necessary
I'm new to Code Review and new to writing bash scripts as well. I was wondering if I could get someone's advice on a part of the script I'm working on.
Intended purpose of code
Check if a package ...
3
votes
1answer
24 views
A minimal init script
I tried looking up some good example init scripts, but all that I found were excessively complicated. So I wrote my own simple init script targeting CentOS 6. I tried to follow LSB where I understood ...
5
votes
3answers
102 views
Check disk space against a threshold
The below script is one I made to check the disk space on mounted partitions under Debian Wheezy. I tried adding a -d switch to force printing out the used data, ...
4
votes
3answers
324 views
Shell script to sync dotfiles repository
I'm doing the git dot files thing and created a script -- my first Unix shell script -- to synchronise the repo dot files with those in the user's home. It checks which dot files exist in the repo ...
4
votes
1answer
138 views
Shell script for creating CR questions
Inspired by Tool for creating Code Review questions.
This script generates a markdown document suitable for a CR question from a list of files. For each file it finds, it sends the following to ...
4
votes
1answer
210 views
Mount different remote systems
I have a shell script to mount different remote systems. While it does work, the area I struggle with (not being a programmer) is the logic of the script: it feels quite stilted and there seems to be ...
3
votes
3answers
857 views
6
votes
2answers
2k views
Shell script to assist with branch management for tasks in git
I found nvie's git branching model simple enough to grasp and suitable for my projects - but the frontend supplied at GitHub was far too complex for me to understand. Hence, I wrote this script to ...
2
votes
0answers
46 views
Script to configure Synaptics touchpad
I have a shell script to configure Synaptics touchpad settings at login.
Background
You configure the touchpad with the synclient command. Its usage is
...
7
votes
3answers
129 views
Shell Script Image Replication
I have a shell script which is being used on an embedded human machine interface (HMI). This script is used to copy a few files from a USB stick to a different place on the device, but with multiple ...
6
votes
2answers
128 views
Optimize bash script that concatenates output
I am trying to optimize my script that loops through a folder and extracts only the part of a file name before a date and the header of the file and outputs it into a different file using a delimiter. ...