Results for “Streams & byte tools”
Small, practical examples. Search by task or narrow things down below.
Extract a compressed tar archive
Extract a trusted gzip-compressed tar archive into a dedicated destination directory.
tar✓ Tested
Find files by extension
Search a directory tree for regular files with a particular extension and print their paths.
find✓ Tested
Format several integers in a fixed buffer
Arduino / C: snprintf limits writes to the buffer size and includes a terminating null byte.
Arduino / C✓ Tested
Give an LED pin a constant name
Arduino / C: Use const to name the built-in LED pin and reuse it in output instructions.
Arduino / C✓ Tested
Handle incomplete serial input
Arduino / C: The returned byte count distinguishes a complete payload from a timed-out partial one.
Arduino / C✓ Tested
Inspect a file length without reading it
C#: Use FileInfo.Length to retrieve a logical size in bytes.
C#✓ Tested
List files in a tar archive
Inspect the contents of a gzip-compressed tar archive without extracting any files.
tar✓ Tested
List running processes
Display process IDs, parent process IDs, and command names for all visible processes.
process✓ Tested
Measure a short text value
Python: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
Python✓ Tested
Measure a short text value
C#: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
C#✓ Tested
Measure a short text value
Java: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
Java✓ Tested
Measure a short text value
JavaScript: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
JavaScript✓ Tested