The umask clears permission bits from new files and never adds them
Why a file created with mode 0666 ends up 0644, how to read and set the umask, and why chmod after creation is not masked.
Topic · 8 stories
8 stories tagged shell on AI Tamer, newest first.
Why a file created with mode 0666 ends up 0644, how to read and set the umask, and why chmod after creation is not masked.
The same line in an environment file can give three different values in Docker Compose, a systemd unit and a shell. Three documented differences: comments, backslashes and spaces.
Errexit skips failures in conditions, && and || lists, negated commands and early pipeline stages. Learn the rules from the Bash manual and POSIX, and how pipefail closes the pipeline gap.
A newline in one filename can turn a transcript-ingestion job into two wrong arguments. Use NUL-delimited find and xargs streams, and keep the boundary intact downstream.
Use curl --fail-with-body when a script needs to detect an HTTP error and keep the response text that explains it.
Bash reports a command status from 0 to 255. This explainer covers 0, 126, 127 and signal exits, then shows why grep and curl need tool-specific handling.
A pipeline, a log tee or a local variable can turn a failed command into exit status 0. Patterns that hide failure from CI and AI agents, and how to make the status tell the truth.
How to read --help, exit codes and the man page of a command-line tool before a script or agent depends on it, with grep, git and curl as examples.