FIND YOUR NEXT FEW LINES

Results for “exit status”

Small, practical examples. Search by task or narrow things down below.

52 snippets foundClear filters
jQueryHTTP requests

Cancel a pending request

jQuery: abort rejects the jqXHR with the abort status.

jQuery✓ Tested
Linux CommandsSorting & joining records

Check whether a file is already sorted

Linux Commands: Use sort -C for a quiet status check that does not rewrite the file.

Linux Commands✓ Tested
Bash ScriptsFiles & reliability

Clean up a temporary directory automatically

Use an EXIT trap so temporary files are removed when the script ends.

mktemp✓ Tested
Arduino / CSerial communication

Collect a serial line in a fixed buffer

Read a short command without dynamic String allocation.

serial line✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Distinguish an empty input line from end of input

Bash Scripts: A successful read can return an empty value; its status indicates whether a line was read.

Bash Scripts✓ Tested
GitInspecting the working tree

List newly added staged files only

Git: Filter the cached diff by added status while leaving modified files out.

Git✓ Tested
GitMerging & replaying changes

List the paths with unresolved merge conflicts

Git: The U diff filter identifies unmerged entries without parsing human-readable status output.

Git✓ Tested
Docker / ComposeLimits & process security

Prevent gaining privileges through exec

Docker / Compose: The no-new-privileges flag is visible in process status.

Docker / Compose✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Reject a missing required configuration value

Bash Scripts: Check a required value explicitly and emit a controlled diagnostic before exiting.

Bash Scripts✓ Tested
Bash ScriptsArguments & decisions

Repeat until a condition becomes true

Bash Scripts: An until loop continues while its test returns a nonzero status.

Bash Scripts✓ Tested
Docker / ComposeExecution & file transfer

Retrieve a file from a stopped container

Docker / Compose: The writable layer remains available for docker cp after exit.

Docker / Compose✓ Tested
Docker / ComposeContainer commands

Run a one-off container

Run a command and remove its stopped container automatically.

run✓ Tested