You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
-
3Rather than be overly judgemental and label things as abominations like a wild-eyed zealot, it's far better and far more useful to strive to put Postel's Law into practice with every piece of code you write. Postel's Law is also known as the Robustness Principle and can be summarised as: "be conservative in what you send, be liberal in what you accept". While it needs to be applied with caution, it is a good part of the reason why the internet exists and doesn't suck anywhere near as much as it could, and why interoperability is possible.cas– cas2025-09-06 16:14:00 +00:00Commented Sep 6 at 16:14
-
2You certainly shouldn't ignore, or deliberately sabotage, parts of a spec just because you don't like them or think they're too much trouble. Every character except NUL is valid in a pathname. Every character except NUL and / is valid in a filename. The posix spec allows newlines and other "annoying" characters in environment variable names and requires that applications "tolerate the presence of such names". If you fail to do that, it's not the file or variable names that are at fault, it's you and your code.cas– cas2025-09-06 16:18:06 +00:00Commented Sep 6 at 16:18
-
1Also, as @emron's C code showed, shells are not the only source of environment variables. Pretty much every language has some trivial method to export them to the environment of child processes. And shells can obviously be child processes that inherit annoyingly-named variables from parent processes.cas– cas2025-09-06 16:19:56 +00:00Commented Sep 6 at 16:19
-
2@GyroGearloose, Linus might have a say about how things are done by the Linux kernel, but not all of Unix-land is Linux. He's not god or king and he can't make e.g. the BSDs or commercial Unixen do things his way. Also, even the Linux kernel quite happily accepts pretty much any binary string in filenames. You might consider putting down the book you found those commandments in...ilkkachu– ilkkachu2025-09-06 20:45:34 +00:00Commented Sep 6 at 20:45
-
2I'm not saying how or why applications should filter their inputs, just that they should. It's up to the application to make sure its input data is handled in a safe way.user10489– user104892025-09-07 01:02:44 +00:00Commented Sep 7 at 1:02
|
Show 10 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
-
create code fences with backticks ` or tildes ~
```
like so
``` -
add language identifier to highlight code
```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_`
- quote by placing > at start of line
- to make links (use https whenever possible)
<https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. shell-script), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
lang-bash