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: &nbsp...
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...
Venosity asked 27/3, 2019 at 16:49

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...
Morpho asked 26/11, 2015 at 23:43

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...
Catchfly asked 27/5 at 14:35

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 ...
Keeton asked 30/11, 2013 at 22:28

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....
Caduceus asked 10/3, 2010 at 15:36

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...
Circularize asked 6/4, 2014 at 18:16

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...
Unplumbed asked 25/2, 2010 at 17:41

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....
Vibrio asked 2/1, 2015 at 2:8

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 )"
Gallows asked 23/4, 2015 at 18:54

3

According to the isascii() manpage: http://linux.die.net/man/3/isascii POSIX.1-2008 marks isascii() as obsolete, noting that it cannot be used portably in a localized application. I'm not su...
Ignatius asked 25/9, 2014 at 5:6

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...
Joris asked 8/1, 2013 at 15:25

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...
Arborvitae asked 5/7, 2016 at 8:28

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...
Handmedown asked 8/9, 2015 at 10:43

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...
Monotonous asked 26/2, 2016 at 13:7

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...
Hardison asked 2/3, 2011 at 11:11

© 2022 - 2024 — McMap. All rights reserved.