Questions tagged [posix-compliant]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
1 answer
411 views

What's the difference between `;` and space when setting environment variable before running a command

I've been wondering what's the difference between the two: CAROOT='certificates'; echo $CAROOT - prints the value, uses ; as separator between two commands CAROOT='certificates' echo $CAROOT - prints ...
The.Wolfgang.Grimmer's user avatar
0 votes
1 answer
50 views

Bash from scratch --again

As my journey through Bash goes on, I'm still stuck on ridiculous stuff such as this script I just can't wrap my head around on: #!/bin/bash if [ $1 -gt 100 ] then echo "You typed a larger ...
Sneakatoo's user avatar
5 votes
1 answer
1k views

In bash `$-` yields `himBHs` but `i` and `s` are invalid options -- what's going on?

$ echo $- himBHs $ set -h $ set -i bash: set: -i: invalid option set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...] $ set -m $ set -B $ set -H $ set -s bash: set: -s: invalid option ...
Craig  Hicks's user avatar
5 votes
0 answers
3k views

stropts.h install for Ubuntu 20.01 [closed]

I have just installed Ubuntu 20.04 and am trying to compile my pintOS project and it says stropts.h not found and I have researched a bit that it only works on Ubuntu 18.04. Someone share a way to ...
Benny Joseph's user avatar
0 votes
1 answer
667 views

how to run an appimage app stored at a fat32 storage

As appimage aims to allow portability I was expecting something very similar to the apple .app format (apple.application-bundle) . I don't know how to launch an app from an appimage file stored in a ...
Daniel Perez's user avatar
-1 votes
1 answer
253 views

Why doesn’t Ubuntu's `time` follow the standard POSIX format and how do I change it?

If you measure times in Ubuntu 18.04, the result apears in a single line: $ time sleep 1 sleep 1 0.00s user 0.00s system 0% cpu 1.003 total This doesn’t align with the POSIX standard, as described ...
pvorb's user avatar
  • 101
1 vote
1 answer
414 views

How compatible dash is with ksh?

Can I make /bin/sh symlinked to /bin/ksh instead of /bin/dash without breaking anything in the process ? Since they're both supposed to be POSIX-compliant, can I reasonably expect the replacement to ...
Sergiy Kolodyazhnyy's user avatar
0 votes
1 answer
176 views

Why sigset includes unadded SIGINT? [closed]

Wrote simple program to learn writing POSIX style signal handling. #include <signal.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> static void sig_int(int); ...
user avatar
1 vote
2 answers
93 views

list files or dirs starting with 'jre'

I need to list files and dirs with names starting with jre (small and capital letters are allowed). When I execute: ls | grep jre ...it greps just low capital letters and gives output with jre not ...
vico's user avatar
  • 4,537
3 votes
2 answers
14k views

How to skip a record with awk

I have a large number of files in a log-directory, whose names were time-stamped (in this case with date +%b[...]). I want to write a POSIX compliant one-liner that will: either skip lines output ...
Cbhihe's user avatar
  • 2,761
189 votes
4 answers
194k views

How to grep for tabs without using literal tabs and why does \t not work?

When I search for tabs in a file with (e)grep I use the litteral tab (^v + <tab>). I can not utilize \t as a replacement for tabs in regular expressions. With e.g. sed this expression works very ...
Lasall's user avatar
  • 3,703