Results for “os”
Small, practical examples. Search by task or narrow things down below.
Range over a closed channel
Range over a closed channel using a complete Go program with explicit sample inputs.
Go✓ Tested
Read a channel until all senders close
Read a channel until all senders close in a complete Rust program using the standard library.
Rust✓ Tested
Read a file without losing its last line
Handle spaces, backslashes, and a final line without a newline.
read lines✓ Tested
Read a line without losing backslashes
Bash Scripts: Read a line without losing backslashes with a small standalone Bash program.
Bash Scripts✓ Tested
Read a repository-specific configuration value
Git: The local scope makes configuration lookup predictable for this practice repository.
Git✓ Tested
Read a URL’s host and path
Read a URL’s host and path using a complete Go program with explicit sample inputs.
Go✓ Tested
Read a variable whose name is stored in another variable
Bash Scripts: Indirect expansion performs one extra variable-name lookup.
Bash Scripts✓ Tested
Read bytes from a chosen file offset
C: Check fseek before reading so an unsupported or invalid seek is not ignored.
C✓ Tested
Read positional parameters in a function
Bash Scripts: Read positional parameters in a function with a small standalone Bash program.
Bash Scripts✓ Tested
Read repository-local configuration
Git: Read repository-local configuration inside the disposable repository created by the input setup.
Git✓ Tested
Remove one array element and close the gap
C: memmove handles the overlap while the logical length shrinks by one.
C✓ Tested
Replace an element while preserving its position
jQuery: replaceWith swaps an entire node.
jQuery✓ Tested