Questions tagged [standard]

99 questions
168
votes
4 answers

What exactly is POSIX?

I see POSIX mentioned often and everywhere, and I had assumed it to be the baseline UNIX standard.. until I noticed the following excerpt on a Wikipedia page: The Open Group The Open Group is most famous as the certifying body for the UNIX …
Peter.O
  • 32,426
  • 28
  • 115
  • 163
107
votes
5 answers

Do progress reports/logging information belong on stderr or stdout?

Is there an official POSIX, GNU, or other guideline on where progress reports and logging information (things like "Doing foo; foo done") should be printed? Personally, I tend to write them to stderr so I can redirect stdout and get only the…
terdon
  • 234,489
  • 66
  • 447
  • 667
104
votes
5 answers

Differences between sed on Mac OSX and other "standard" sed?

I am having some issues in using an answer provided on this site for this question about a sed command to replace a blank line with two other lines of content, and it was brought up if the sed command on Mac OS (10.6.7 for me) is different. I don't…
Peter Grill
  • 1,573
  • 3
  • 15
  • 19
80
votes
4 answers

What's the standard for indentation in shell scripts?

Java community use 4 spaces as the unit of indentation. 1 Ruby community use 2 spaces that is generally agreed-upon. 2 What's the standard for indentation in shell scripts? 2 or 4 spaces or 1 tab?
Arturo Herrero
  • 2,386
  • 2
  • 19
  • 18
75
votes
6 answers

Resources for portable shell programming

What resources exist for portable shell programming? The ultimate answer is to test on all targeted platforms, but that's rarely practical. The POSIX / Single UNIX specification is a start, but it tells neither you what the level of support of each…
Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
47
votes
3 answers

Which are the standard commands available in every Linux based distribution?

I would like to know which are the standard commands available in every Linux system. For example if you get a debian/ubuntu/redhat/suse/arch/slackware etc, you will always find there commands like: cd, mkdir, ls, echo, grep, sed, awk, ping etc. I…
Vangelis Tasoulas
  • 1,637
  • 1
  • 16
  • 16
30
votes
1 answer

What protocol/standard is used by terminals?

I was wondering how the "GUI" of a command line application is communicated over a network. Most of the time, it's quite simple (plain text / input) but sometimes it's more complex (aptitude). Is it defined by some sort of standard so that anyone…
Olivier Lalonde
  • 5,149
  • 5
  • 24
  • 20
27
votes
4 answers

Is the shell permitted to optimize out useless terminating commands?

If a shell is asked to perform a probably useless (or partially useless) command known to terminate, such as cat hugeregularfile.txt > /dev/null, can it skip that command's execution (or execute a cheaper equivalent, say, touch -a…
25
votes
2 answers

practical usage of /etc/networks file

What is the practical usage of /etc/networks file? As I understand, one can give names to networks in this file. For example: root@fw-test:~# cat /etc/networks default 0.0.0.0 loopback 127.0.0.0 link-local 169.254.0.0 google-dns …
Martin
  • 7,284
  • 40
  • 125
  • 208
24
votes
2 answers

Why isn't GNU/Linux SUS v3+ compliant?

I am looking for specific details as to why isn't GNU/Linux currently SUS (Single UNIX Specification) v3 or even better SUS v4 compliant? What application APIs and user utilities does it miss or implement in a non-SUS compliant way?
Shinnok
  • 1,026
  • 7
  • 12
23
votes
5 answers

What's the difference between Debian Standard and Gnome?

I was wondering, is there any differences between Debian Standard and GNOME versions? Isn't Debian under GNOME by default?
PeterFour
  • 383
  • 1
  • 2
  • 7
21
votes
2 answers

An official standard / convention for a file extension for shell scripts to source

I was wondering if there is a convention for file type extensions for shell scripts you want to source instead of run. For example: If I want to run this script in a subshell. ./script.sh If I want to remember to run this script from the…
Mateusz Piotrowski
  • 4,623
  • 5
  • 36
  • 70
20
votes
6 answers

How stable are Unix shell "stdin/stdout APIs"?

grepping, awking, sedding, and piping are day-to-day routine of a user of any Unix-like operating system, may it be on the command line or inside a shell script (collectively called filters from now on). At their essence, when working with…
Abdull
  • 665
  • 1
  • 7
  • 13
20
votes
2 answers

Where can I find official POSIX and UNIX documentation?

I am looking for official documents on all POSIX standards and specifications. I would like to be able t read the docs to get a better understanding of UNIX systems and how they work at a low level. I've seen links here and there to opengroup.org,…
n0pe
  • 9,411
  • 13
  • 60
  • 108
16
votes
2 answers

View POSIX draft standards

The GNU sed manpage says: The -E option switches to using extended regular expressions instead; it has been supported for years by GNU sed, and is now included in POSIX. However, POSIX Issue 7 (2018) sed doesn't list -E as an option. Where…
Tom Hale
  • 28,728
  • 32
  • 139
  • 229
1
2 3 4 5 6 7