posix Questions
3
Solved
The section 3.4 Using Bracket Expressions of GNU awk manual, reads
To include one of the characters ‘\’, ‘]’, ‘-’, or ‘^’ in a bracket expression, put a ‘\’ in front of it. For example:  ...
Foreigner asked 2/11 at 14:38
5
Solved
The utility which will find a program on the path but what about an arbitrary data file?
I must be searching for the wrong stuff but I can't find any way to do this with a standard utility so I th...
2
sys_errlist is a handy array which allows getting static errno descriptions. The alternative to it is the strerror_r function, which is available in two confusing incompatible flavors. The GNU vers...
2
Solved
On Godbolt, opening /dev/null for writing fails when you use fopen but succeeds when you use open, and I have no idea why.
#include <stdio.h>
#include <stdlib.h>
#include <string.h&g...
Kv asked 30/5 at 7:52
4
Solved
I'm trying to implement an awk function for splitting a string into an array; the fundamental difference with the built-in split is that one is able to limit the number of "splits" that a...
4
I have to implement the Bash set -o pipefail option in a POSIX way so that it works on various Linux/Unix flavors. To explain a bit, this option enables the user to verify the successful execution ...
Peashooter asked 26/10, 2012 at 9:33
4
Is there some similar option in dash shell corresponding to pipefail in bash?
Or any other way of getting a non-zero status if one of the commands in pipe fail (but not exiting on it which set -e ...
Preemie asked 19/7, 2013 at 23:34
3
Solved
Is there a findall function in C's regex library like there is in python:
re.findall(pattern, input_string)
I have a string containing filenames like so: "path/to/file1.ics,path/file2.ics" with ...
5
Solved
I am pretty new to Ubuntu, but I can't seem to get this to work. It works fine on my school computers and I don't know what I am not doing. I have checked usr/include and time.h is there just fine....
2
Solved
I am reading The Linux Programming Interface and it describes several different types of socket used on Linux:
Unix domain
Berkeley
TCP
Internet
One of the things the book said is that if you wan...
17
Solved
After reading the mkdir(2) man page for the Unix system call with that name, it appears that the call doesn't create intermediate directories in a path, only the last directory in the path. Is ther...
10
Solved
I want to get the value of a specific field of a secret in a shell script.
From the kubectl get secret documentation, it seems the standard way to get a secret returns the whole thing, in a specif...
Lusatia asked 6/8, 2019 at 15:10
2
Solved
When I compile a program using the POSIX sem_init() function, I get a compilation warning (error because I normally use -Werror) that the function has been deprecated when I compile on Mac OS X 10....
13
Solved
I am looking for a way to get the output of a command when it is run from within a C++ program. I have looked at using the system() function, but that will just execute a command. Here's an example...
Gifted asked 26/1, 2009 at 5:11
4
Solved
I have the following code in my bash script. Now I wanna use it in POSIX sh. How can I convert it?
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )"
3
7
Solved
This has been asked several times with no clear answer: I would like to convert an R character string of the form "YYYY-mm-dd" into a Date. The as.Date function is exceedingly slow. convert charact...
2
I've written a networking server that uses OpenSSL for SSL/TLS. The server sends and receives large blocks of data and performs various transformations in between. For performance reasons, transfor...
5
I am already aware of the real user id. It is the unique number for a user in the system.
On my system, my uid is
$ echo $UID
1014
$
What do the other two IDs stands for?
And what is the use of ef...
8
Solved
I'm developing on windows, but need to know how to convert a windows path (with backslashes \) into a POSIX path with forward slashes (/)?
My goal is to convert C:\repos\vue-t\tests\views\index\ho...
Systemic asked 16/12, 2018 at 4:16
2
Tensorflow 2.9.1 on Ubuntu 20.04 with CUDA 11.2 keeps writing to the stdout the following error whenever I try to build a few layers:
2022-06-05 08:32:29.319040: I tensorflow/stream_executor/cuda/c...
Dermatitis asked 5/6, 2022 at 5:40
16
Solved
What exactly is POSIX? I have read the Wikipedia article but I still don't understand.
Decay asked 23/11, 2009 at 0:42
5
Solved
Posix requires changing RTS pin on port opening. I want a way to avoid it.
Grasshopper asked 23/2, 2011 at 11:47
6
Solved
In pure /bin/sh how can I distinguish between an empty variable, an unset variable and a not existing (not defined) variable.
Here are the case:
# Case 1: not existing
echo "${foo}"
# Case 2: un...
8
Solved
How can I tell what type my shell is? ie, whether it's traditional sh, bash, ksh, csh, zsh etc.
Note that checking $SHELL or $0 won't work because $SHELL isn't set by all shells, so if you start i...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.