Skip to main content

Questions tagged [posix]

POSIX is an acronym for Portable Operating System Interface, a family of standards specified by the IEEE for maintaining compatibility between operating systems.

4 votes
3 answers
291 views

Help w/ "posix-extended" regex for 'find'

Can someone explain the issue I've described below, and perhaps suggest a resolution? I'm trying to process a set of filenames using find. My platform is macOS (Ventura 13.7.7), and the shell is zsh ...
Seamus's user avatar
  • 3,833
0 votes
0 answers
26 views

Posix filesystem features overlay [duplicate]

I have a remote system where I can create only files and directories. No symlinks, ACLs, hard links, devices, nothing. I think, it would be really useful to be able to use it even as a linux root ...
peterh's user avatar
  • 10.5k
0 votes
0 answers
47 views

pgrep executable matching specific (current) user only

In a code review on Final look at my Lightshot print screen Linux handler POSIX shell script, specifically in this short answer, it has been pointed out to me, that if there are multiple X servers ...
Vlastimil Burián's user avatar
7 votes
3 answers
912 views

With `#!/bin/sh`, what is the closest to `;;&` (`bash`'s fallthrough)?

Without ;;&, /bin/sh gives Syntax error: ")" unexpected (expecting ";;"). ;;& triggers shellcheck's ^-- SC2127 (error): To use cases with ;;&, specify #!/usr/bin/env ...
Swudu Susuwu's user avatar
7 votes
1 answer
263 views

Newlines in environment variable names under POSIX sh

This question asks how to get a list of environment variable names in POSIX sh. The top answer suggests invoking awk via the shell, but gives this caveat: The output is ambiguous if the name of an ...
emron's user avatar
  • 365
14 votes
1 answer
868 views

Does POSIX guarantee that awk programs with only a BEGIN action won't read stdin?

Consider this awk invocation: awk 'BEGIN {print 1}' There are no input files, so stdin is used for input. However, the program only contains a BEGIN pattern, so there is no need to read it. Does ...
emron's user avatar
  • 365
1 vote
0 answers
50 views

setfacl on Cygwin always returns "permission denied"

I apologize in advance if this isn't the right forum to post this, but since it's a Linux tool on an (emulated) Linux platform (and since I saw some other Cygwin-related questions on here) this is the ...
dwillis77's user avatar
  • 111
3 votes
2 answers
138 views

Localising variables in /bin/sh functions

POSIX defines shell functions as: fname ( ) compound-command [io-redirect ...] The compound-command is further defined as either: ( compound-list ) { compound-list ; } In particular POSIX notes for ...
Chris Davies's user avatar
4 votes
1 answer
343 views

POSIX-compliance of NMAKE

NMAKE by Microsoft comes with some components of Visual Studio. Is it POSIX-compliant?
user avatar
0 votes
2 answers
85 views

Do race conditions occur during pathname resolution with constant string absolute path literals?

According to The Open Group Base Specifications Issue 8, on the rationale of the open() and openat() functions: The purpose of the openat() function is to enable opening files in directories other ...
Salubia's user avatar
12 votes
1 answer
942 views

How are specification issues / defects of POSIX collected and how can I participate?

While pondering whether IEEE 1003.1-2017 forbids race-condition safe ln -f, it occurred to me: Even if this is really an unfortunate definition (which GNU coreutils' ln thankfully ignores), I would ...
Marcus Müller's user avatar
15 votes
3 answers
3k views

Why Linux read() avoids using full 2 GiB in one call

Reading the manual page (man 2 read) on my Debian system, I see the following note: NOTES [...] On Linux, read() (and similar system calls) will transfer at most 0x7ffff000 (2,147,479,552) bytes, ...
malat's user avatar
  • 3,459
1 vote
4 answers
187 views

Need shell script help - processing the same option multiple times

So I've ran into a bit of a wall, I have an option in my script that calls a function which allows me to specify a file/directory and then I want to parse that output into a menu tool (using dmenu in ...
hollowillow's user avatar
2 votes
1 answer
168 views

What is the origin of the -E option of the `realpath` command in POSIX issue 8?

The realpath command utility is now defined by POSIX in its issue 8 (2024): realpath — resolve a pathname realpath [-E|-e] file The realpath utility shall canonicalize the pathname specified by the ...
Fravadona's user avatar
  • 1,601
7 votes
2 answers
1k views

How to find out if a command wrote to stdout or not

I'd like to figure out if an external program ran successfully and wrote something to stdout, or if it did not write anything, which happens in case an error occurred. The program unfortunately always ...
finefoot's user avatar
  • 3,554

15 30 50 per page
1
2 3 4 5
47