Skip to main content

Questions tagged [sh]

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.

3 votes
2 answers
569 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 ...
Vlastimil Burián's user avatar
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: ...
Anas's user avatar
  • 129
2 votes
2 answers
79 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 ...
Madagascar's user avatar
  • 10.1k
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 ...
Tobias Grothe's user avatar
1 vote
1 answer
54 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 ...
Tobias Grothe's user avatar
2 votes
2 answers
140 views

Script to prevent nested root shells (POSIX)

Script to prevent nested root shells shall do exactly as said, plus some niceties like an error message when someone runs it with some argument/option. ...
Vlastimil Burián's user avatar
4 votes
1 answer
81 views

Debian and Docker compose upgrade script, 2nd version

As a continuation of this question, I would like a second review from you. Here is the updated sh script: ...
Tobias Grothe's user avatar
3 votes
1 answer
191 views

Debian and Docker compose upgrade script

I'm running Debian 12 and Docker compose containers. Once a day, crontab should start the script, but the script should also be called manually. Could you rate my upgrade script file or recommend an ...
Tobias Grothe's user avatar
12 votes
3 answers
2k views

Blog site generator written in shell script

Since I am not a fan of having using large web-frameworks and libraries just to setup a simple blog, I decided to write my own static blog site generator in pure shell script. The script uses pandoc, ...
766F6964's user avatar
  • 901
3 votes
1 answer
436 views

Shell script to download multiple files from different URL's using for loop to download and verify files on each invocation

The expected behavior of the script is to download a file from a URL if the file is not present in the current directory and compare the md5 checksum of the file against the md5 checksum from the ...
Chris Stone's user avatar
0 votes
0 answers
37 views

For loop to download files once and verify them on each invocation [duplicate]

The complete script works as expected. I am able to download and verify the files. If the file is all ready present verification is retested and downloads if necessary. I'm in the process of teaching ...
Chris Stone's user avatar
2 votes
2 answers
152 views

Linux Script Set Permission Function

I wrote a simple script to set permissions for a file or folder for some embedded Linux devices as part of a larger setup script. This method would be called on less than 20 files and folders. It ...
netcat's user avatar
  • 203
2 votes
2 answers
116 views

Shell script to download, compile and run Analog Clock in AEC

As some of you know, I have made a programming language, called AEC, and written two compilers for it, one targetting x86 and other targetting WebAssembly. Recently, I have tried to write two shell ...
FlatAssembler's user avatar
3 votes
1 answer
58 views

Find first or last argument lexicographically or temporally

I often find I need to find the earliest or latest file matching a given pattern, and sometimes to choose the lowest or highest string from several possibilities. The following four functions provide ...
Toby Speight's user avatar
  • 88.3k
3 votes
1 answer
102 views

PDFcomp: A PDF comprimer easy script

I developed this script in dead time to be able to compress the PDFs that they send me to university and also to be able to send scans to the various institutions that require formats that do not ...
NFVblog's user avatar
  • 61

15 30 50 per page
1
2 3 4 5
7