Questions tagged [posix]
Use this tag for code that is intended to be work on any system conforming to POSIX specifications.
19
questions
6
votes
1
answer
906
views
Shell POSIX OpenSSL file decryption script
Tonight, I tried to write a Bash OpenSSL file decryption script. Encryption script will follow in highly similar manner, so I think it's not necessary now.
Let's suppose we have an encrypted large ...
1
vote
1
answer
157
views
Shell POSIX OpenSSL file decryption script follow-up #1
This question is the first follow-up of: Shell POSIX OpenSSL file decryption script
Please read it before you continue reading this. Thank you.
I only have one new problem solved and I would like ...
18
votes
3
answers
12k
views
Implementation of the ls command with several options
As part of a past assignment, I've expanded on this implementation of ls to have more options available, including non-standard ones.
It currently supports these (...
11
votes
2
answers
1k
views
Multiperson chat server using the select() API
I followed the Beej's Guide to Network Programming. The program acts like a multi-user chat server. One connects and sends a message to the server, which is forwarded to all that are connected. There'...
11
votes
2
answers
1k
views
Implementation of the ls command with several options - follow-up
I've made vast improvements to my previous ls implementation, including:
Added new flags:
-g (omit owner listing)
...
7
votes
2
answers
237
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).
...
6
votes
2
answers
153
views
Generic circular doubly-linked list v2
I've improved, with help of the answers and comments, the linked list that I posted yesterday. It's been through a lot of changes, and is much more useful and safe now.
I documented the linked list ...
5
votes
1
answer
228
views
Interactive Linux upgrade script
One year ago, I asked for a review of Simple Linux upgrade script in Bash.
Conditions are slightly changed, and/or more accurate:
Code readability for the code user, making it simple to adjust the ...
3
votes
1
answer
139
views
POSIX + BSD-extensions implementation of shuf(1)
I implemented GNU shuf(1) in C using POSIX system calls and some BSD extensions. You must compile it with -lbsd.
...
3
votes
2
answers
479
views
Generic error handler function for POSIX shell scripts
Intention
I came with the idea of generic, portable, highly reliable, and further customizable function for Shell scripts, written in POSIX, for error handling.
Purpose
The function shall find out, ...
3
votes
2
answers
601
views
Implementation of the "tee" utility program
How can I optimize the program? To make it more optimal? The program should be more optimal in terms of source code, compiled executable size, memory usage, speed, bugs etc. Please criticize the ...
3
votes
1
answer
101
views
Easy to use code preparation script for CodeReview questions
We all face questions that forget to include their code. Sometimes all of it, sometimes only parts, that make the rest of the question unfortunately incomplete and therefore off-topic.
What if it was ...
3
votes
1
answer
170
views
Lightshot Print Screen key linux handler
I haven't found any Lightshot Print Screen key linux handler publicly available.
So, I decided to write one today. It is a standard POSIX shell script.
I believe there is always space to get better, ...
2
votes
1
answer
126
views
Editing system files in Linux (as root) with GUI and CLI text editors
My intention is to POSIX-ly write one generalized function for running various text editors I use for different purposes through sudoedit, i.e. editing files as ...
2
votes
2
answers
50
views
POSIX-ly finding a specific Java process
In this code I find a list all of the running java processes and give the below function a name to look for, it will do its best. But since I find my approach a ...
2
votes
1
answer
32
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 ...
1
vote
1
answer
131
views
Bash Code to backup the history file in Linux [closed]
How is the logic, efficiency and can it be improved?
This is a snippet from my .bashrc file, I just wrote it.
The code is supposed to do this:
Backup my ...
1
vote
2
answers
149
views
Editing system files in Linux (as root) with GUI and CLI text editors #2
This is the second iteration of this question
A note to start with: the first iteration of this question can be found here:
Editing system files in Linux (as root) with GUI and CLI text editors
As ...
0
votes
1
answer
65
views
Shell POSIX OpenSSL file decryption script follow-up #2
This question is the second follow-up of: Shell POSIX OpenSSL file decryption script
The first follow-up was: Shell POSIX OpenSSL file decryption script follow-up #1
Both of which have proven very ...