Results for “process”
Small, practical examples. Search by task or narrow things down below.
Set an environment value for one child command
Bash Scripts: A command-prefix assignment is visible to that command without overwriting the shell’s current variable.
Bash Scripts✓ Tested
Set and inspect a fractional CPU limit
Docker / Compose: The cpus option records a limit in units of one billion NanoCPUs.
Docker / Compose✓ Tested
Start a command with a minimal environment
Linux Commands: Use env -i with an explicit PATH for a controlled child environment.
Linux Commands✓ Tested
Wait for a background job before reading its output
Bash Scripts: Save the job PID and wait explicitly before consuming files it produces.
Bash Scripts✓ Tested
Wait for an actual container health check
Docker / Compose: Health reports readiness independently from process startup.
Docker / Compose✓ Tested
Accept one typed value at a time from a pipeline
PowerShell: An advanced function uses process to handle each pipeline item.
PowerShell✓ Tested
Check whether text is valid JSON
Reject malformed input before processing it.
json_valid✓ Tested
Copy a file into a created container
Docker / Compose: docker cp can copy into a container before its process starts.
Docker / Compose✓ Tested
Count lines in a file
Count newline characters in a text file, printing only the count without the filename.
lines✓ Tested
Keep function state between calls
C: A static local variable retains its stored value for the lifetime of the process.
C✓ Tested
Replace text with sed
Replace all occurrences of the substring old on each line and print the transformed text without changing the input file.
sed✓ Tested
Restore an environment value after temporary use
PowerShell: Use finally so temporary process configuration does not leak to subsequent work; remove the entry when it was originally absent.
PowerShell✓ Tested